You might encounter compilation error in Visual Studio 2015 when a new .NET Core 1 web app is created, if you have installed Visual Studio 2017 (RC as of now). When a new .NET Core 1 web application is created/opened in Visual Studio 2015, with the project template you get with .NET Core 1.0.1 tools Preview 2, while having ".NET Core cross-platform development" for Visual Studio 2017 in your machine, you might see below error prompted.
---------------------------
Microsoft Visual Studio
---------------------------
The following error occurred attempting to run the project model server process (1.0.0-rc4-004771).
Unable to start the process. No executable found matching command "dotnet-projectmodel-server"
The project model server process provides intellisense, build, and reference information to Visual Studio and without it your experience will be very limited. Please try closing and reopening Visual Studio to see if that corrects the problem. Alternatively, check that the .NET Core SDK is properly installed.
---------------------------
OK
---------------------------
When attempt to compile the solution you may encounter a compilation error below.
WebApp.xproj(7,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Open/Create .NET Core 1 Web App error
Compilation error
You might see references for the Core 1 web app is not restored.
Reason for this issue is when you setup ".NET Core cross-platform development" for Visual Studio 2017 .NET Core SDK 1.0.0-rc4-004771 or higher is installed and VS 2015 does not support this SDK. Multiple SDKs here confuse VS 2015.
How to resolve?
Add a global.json file to the location of the solution file.
Set the SDK version (version should be 1.0.0- preview version available in your macine) as shown below in global.json.
{
"sdk": {
"version": "1.0.0-preview2-003131"
}
}
Now close and open the solution in visual studio 2015 and you can see the restore of references. No errors when opening solution.
Build solution works and you should be able to run the application.
Wednesday, 22 February 2017
Resolve MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found or Unable to start the process. No executable found matching command "dotnet-projectmodel-server"
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Dynamic block allows to create nested multi level block structures in terraform code. Conditional usage of such blocks are really useful in...
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
9 comments:
thanks a bunch. Its very helpful to me.
Plz share your mail id.
Hi Chaminda, Your posts are very informative. This question is off this topic. But here it is
I am new to TFS and when i build my app and Package binaries by passing inline MSBuild Argument:
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=$(build.artifactstagingdirectory)
Also used "Publish Build Artifact" task and provided path to publish as "$(build.artifactstagingdirectory)"
Binaries are copied as zip but with this lengthy folder path on build server; \$BuildServer\e$\WebWork\1\a\Content\E_C\WebWork\1\s\Dev\ProviderGeoSearch\obj\Release\Package\PackageTmp$Allbinarieshere.
Want to reduce these lengthy subfolders.
Very helpful. Thank you very much
@Sam Instead of publish artifacts use copy publish artifacts task and then provide patterns for content such as **/*.zip which will reduce the path length. If you have multiple locations in your output having defined content lowest possible path with the content will be created in drop depending on the content search pattern you set.
Thanks a lot for your post.
I have encoutered issue after updating the .Net core sdk.
I have not install vs 2017 for the moment
Microsoft is forcing dev to migrate to VS 2017, I think it's too early
this post is resolved my problem & thanx for the great post
Thanks bro u saved my life :) :) :)
It’s too informative blog and I am getting conglomerations of info’s about Dotnet certification. Thanks for sharing; I would like to see your updates regularly so keep blogging.
Regards
Dot Net Training in Chennai
Selenium Training in Chennai
Android Training in Chennai
Thanks ..It is working ..
Post a Comment