vscode-csharp: The project file could not be loaded
Moved from Microsoft/vscode#17028
From @Chrille2k
- VSCode Version: Code 1.7.2 (7ba55c5860b152d999dda59393ca3ebeb1b5c85f, 2016-11-21T22:06:37.428Z)
- OS Version: Windows_NT ia32 10.0.14393
- Extensions: csharp
Extension | Author | Version |
---|---|---|
csharp | ms-vscode | 1.5.3 |
Steps to Reproduce:
- Open C# project with following project.json
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}
- Start debugging and this error is presented:
1>Project "c:\path\to\project\project.json" on node 1 (Build target(s)).
1>MSBUILD : error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
What could possibly be wrong on row 1, position 1? File encoding issue?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (8 by maintainers)
Hi, I suspect that you allowed Visual Studio Code to generate a launch.json and tasks.json using the “MSBuild” template, which will not work with a .NET Core project.json project. Could you try the following for me?
In that case, you should be able to use
dotnet migrate
to migrate your application from project.json to .csproj.