VS 14.0.25431.01 Update3
.NET Core 1.0.1 - VS 2015 Tooling Preview 2
downloaded from this link
create a dotnetcore console app (here is the project.json)
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Everything is created by VS by default....I should be able to start developping....I don't understand how could it fail on package restore
C:\Program Files\dotnet\dotnet.exe restore "c:\users\watashiSHUN\documents\visual studio 2015\Projects\ConsoleApp1\.vs\restore.dg"
MSBUILD : error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1. [c:\users\watashiSHUN\documents\visual studio 2015\Projects\ConsoleApp1\.vs\restore.dg]
under properties->references->.netcoreapp,version=v1.0->microsoft.netcore.app->NU1001 The dependency Microsoft.NETCore.App >= 1.0.1 could not be resolved.
dotnet --info
output:
@watashiSHUN take a look at https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md.
If this doesn't help, perhaps you can help me with a repro as described here:
https://github.com/dotnet/cli/issues/4248#issuecomment-259338964
Thanks!
Rather then sending people through a wormhole of issues and wiki markdown documents could you please re-open this issue and advise on the fix status?
Also rather than imposing laborious repro's as a burden on your consumers would it be too harsh to ask you guys to find and fix the problem?
After all you are the originators here and should probably take responsibility for finding and fixing the problems.
The community is telling you it does not work.
To quote your markdown "To migrate a project open a command prompt and go to the project's root directory. From here, type dotnet migrate and let the tool do its work. For most projects, that's it!"
Nah dude ... it does not.
C:\code\amazon-micrososervices\lambda-has-gots-core>dotnet migrate
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Gavin.nuget\packages.tools\Amazon.Lambda.Tools'.
at System.IO.Win32FileSystemEnumerableIterator1.HandleError(Int32 errorCode, String path)
at System.IO.Win32FileSystemEnumerableIterator
1.CommonInit()
at System.IO.Win32FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler
1 resultHandler)
at System.IO.Win32FileSystemEnumerableFactory.CreateFileNameIterator(String path, String originalUserPath, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.Win32FileSystem.EnumeratePaths(String fullPath, String searchPattern, SearchOption searchOption, SearchTarget searchTarget)
at System.IO.Directory.EnumerateFileSystemNames(String path, String searchPattern, SearchOption searchOption, Boolean includeFiles, Boolean includeDirs)
at System.IO.Directory.EnumerateDirectories(String path)
at Microsoft.DotNet.Cli.Utils.ToolPathCalculator.GetAvailableToolVersions(String packageId)
at Microsoft.DotNet.Cli.Utils.ToolPathCalculator.GetBestLockFilePath(String packageId, VersionRange versionRange, NuGetFramework framework)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.GetToolLockFilePath(LibraryRange toolLibrary, String nugetPackagesRoot)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.GetToolLockFile(LibraryRange toolLibrary, String nugetPackagesRoot)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveCommandSpecFromToolLibrary(LibraryRange toolLibraryRange, String commandName, IEnumerable1 args, ProjectContext projectContext)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveCommandSpecFromAllToolLibraries(IEnumerable
1 toolsLibraries, String commandName, IEnumerable1 args, ProjectContext projectContext)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveFromProjectTools(String commandName, IEnumerable
1 args, String projectDirectory)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.CompositeCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.CommandResolver.TryResolveCommandSpec(String commandName, IEnumerable1 args, NuGetFramework framework, String configuration, String outputPath)
at Microsoft.DotNet.Cli.Utils.Command.Create(String commandName, IEnumerable
1 args, NuGetFramework framework, String configuration, String outputPath)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
I get the same issue as Gavin.
The recommended fix does not appear to work for me - dotnet keeps giving this error regardless of which older version of dotnet I specify in global.json (& I've tried placing global.json basically everywhere in my solution at this point)
Following the linked repro @piotrpMSFT mentioned helped resolve my issue - restoring now requires manual intervention. Unfortunately this has left my machine in a quasi-unsupported-.NETCore state - I want to migrate to 2017 RC but the tooling required (e.g. WCF connected service) is not there, so my 2015U3 has become a hackbox
I solve the same problem in my project by
Tools -> NuGet Package Manager -> Package Manager Console
Select required project from 'Default Project' list
Run the command "dotnet restore" on Package Manager Console
Rebuild the your project again this will solve your problem
Most helpful comment
Rather then sending people through a wormhole of issues and wiki markdown documents could you please re-open this issue and advise on the fix status?
Also rather than imposing laborious repro's as a burden on your consumers would it be too harsh to ask you guys to find and fix the problem?
After all you are the originators here and should probably take responsibility for finding and fixing the problems.
The community is telling you it does not work.