c# - How to write .NET Core csproj with Microsoft.Build? -


for example have .csproj below

<project toolsversion="15.0" sdk="microsoft.net.sdk.web">   <propertygroup>     <targetframework>netcoreapp1.1</targetframework>     <typescriptcompileblocked>true</typescriptcompileblocked>     <ispackable>false</ispackable>   </propertygroup>   <itemgroup>     <packagereference include="microsoft.aspnetcore" version="1.1.0" />     <packagereference include="microsoft.aspnetcore.mvc" version="1.1.1" />     <packagereference include="microsoft.aspnetcore.spaservices" version="1.1.1" />     <packagereference include="microsoft.aspnetcore.staticfiles" version="1.1.0" />     <packagereference include="microsoft.extensions.logging.debug" version="1.1.0" />   </itemgroup>   <itemgroup>     <!-- files not show in ide -->     <none remove="yarn.lock" />   </itemgroup>   <target name="runwebpack" aftertargets="computefilestopublish">     <!-- part of publishing, ensure js resources freshly built in production mode -->     <exec command="npm install" />     <exec command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" />     <exec command="node node_modules/webpack/bin/webpack.js --env.prod" />      <!-- include newly-built files in publish output -->     <itemgroup>       <distfiles include="wwwroot\dist\**" />       <resolvedfiletopublish include="@(distfiles->'%(fullpath)')" exclude="@(resolvedfiletopublish)">         <relativepath>%(distfiles.identity)</relativepath>         <copytopublishdirectory>preservenewest</copytopublishdirectory>       </resolvedfiletopublish>     </itemgroup>   </target> </project> 

how can write .csproj programmatically microsoft.build 15.3.409 ?

seems this code previous .csproj not .net core.

please provide snippet code that.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -