c# - Build Net Framework web application referencing net-standard library with Cake build -


i have 2 projects: net standard class library , regular net framework web application. web application references class library.

i use visual studio 2017 preview.

when try build solution cake using msbuild command unsupported project message:

error msb4041: default xml namespace of project must msbuild xml namespace. if project authored in msbuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" <project> element. if project has been authored in old 1.0 or 1.2 format, please convert ms build 2003 format.

if try use dotnetcorebuild get:

error msb4019: imported project "c:\program files\dotnet\sdk\2.0.2-vspre-006949\microsoft\visualstu dio\v10.0\webapplications\microsoft.webapplication.targets" not found. confirm path in <import> declaration correct, , file exists on disk.

but solution built visual studio.

latest msbuild version has targets build net standard libraries. problem in visual studio preview installation path: cake can't find latest msbuild.

it fail if try specify vs2017 in msbuildtoolversion.

you have specify msbuild executable manually make work vs preview.

string msbuildpath = @"c:\program files (x86)\microsoft visual studio\preview\professional\msbuild\15.0\bin\msbuild.exe";  msbuild("../netstdexample.sln", new msbuildsettings {     verbosity = verbosity.minimal,     toolpath = msbuildpath }); 

update @gary ewan park: there tool determining latest vs install.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -