简体   繁体   中英

How to build a portable class library without Visual Studio?

I'm trying to build a portable library project on a TFS server and I've got the following error:

"The imported project "C:\\Program Files (x86)\\MSBuild\\Microsoft\\Portable\\v4.6\\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk"

It's true, I don't have a Portable directory in MSBuild/Microsoft on the server. I have it on my developer computer, so I guess if I install Visual Studio it will work but I don't want to. I've installed the build tools on the server, with all the available UWP features but I still don't have this Portable directory.

In general, your build server should consist of the same software configuration as a developer workstation. Install Visual Studio. It does not consume a license.

Just copy C:\\Program Files (x86)\\MSBuild\\Microsoft\\Portable folder to your build server. It's pity that build tools 2017 don't create these files automatically.

您是否尝试过仅安装.NET Framework Developer Pack 4.6.2此处的构建工具要点以及具有/buildmachine开关的PortableLibraryTools

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM