5 ms·
Project.json for .net core is gone, there's xproj file. How to change settings, like target framework, per-framework dependencies, build options, pre/post build
by hudo 10y ago
Project.json for .net core is gone, there's xproj file. How to change settings, like target framework, per-framework dependencies, build options, pre/post build steps, etc? I don't see any tooling support for that.
- mason240 10y agoThey seem to go back and forth on that every couple of months.
- tracker1 10y agoThat went away a while ago, unfortunately... though I think yaml may have been better, the json-like structure was much easier than the xml mess for vs projects. Hoping they added an "empty" project that is just files, closest were some of the web projects, but even then, node projects always felt like an alien afterthought... haven't seen how they are in vs2017, guessing they brought in the ntvs stuff into mainline.
- nathanaldensr 10y agoFrom what I've read, Microsoft decided to reintroduce MSBuild as their unified build platform. This includes good ol' csproj and sln files, with a caveat that the actual contents of those files have been greatly simplified. It's still XML.
- int_19h 10y agoSLN files aren't really MSBuild (it can read them, but for any sort of build automation, you're going to be better off with a .proj file referencing all your actual projects).
- hudo 10y agoproject.json is still official way of configuring the projects. Dotnet cli uses that, msbuild is not there yet i think. Empty project is done with "donnet new", and it's really small and light ...
- nathanaldensr 10y agoThe information I've read claims that the new MSBuild system will be released along with what is now called Visual Studio 2017 and .NET Standard 2.0.
- WorldMaker 10y agoRecent versions of the dotnet cli work with both xproj and project.json for the time being, but have defaulted `dotnet new` to the xproj output. It also provides a `dotnet migrate` command to convert a project.json to an xproj.
- WorldMaker 10y agoxproj was the transitionary MSBuild scaffold, I meant csproj, things are returning to the csproj extension. Some details of it all: https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcing-net-core-tools-msbuild-alpha/ https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcin...
- alkonaut 10y agoThe problem with the proj xml files isn't that they are XML but that they weren't meant for human editing. So long as they fix that (no guids, include source files with just source/.cs instead of listing each file etc) then I don't mind XML. In fact I prefer hand editing XML over json if the amount of configuration is nontrivial.
- Matthias247 10y agoFrom what I've seen in the presentation today they addressed these points. There are no more guids, and you can use wildcards for source files.
- moogly 10y agoNitty gritty details and examples here https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcing-net-core-tools-msbuild-alpha/ https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcin...