msbuild

Command-line Package Service Fabric Application

纵然是瞬间 提交于 2021-02-06 10:55:36
问题 Our continuous delivery set-up, until recently, was delivering Service Fabric packages using the following command: msbuild SFApp.sfproj /t:Package This was necessary because the target Package is unavailable at the solution level. I.e. The command msbuild SFSolution.sln /t:Package Fails, as the target does not exist. As our dependency mesh grows, it gets to a point in which most interfaces projects will not build without a solution file (to work around the "OutputPath does not exist" red

Why the “.deps.json” file on release folder and publish output folder size are difference

﹥>﹥吖頭↗ 提交于 2021-02-05 11:52:35
问题 I build on project and checked on release folder size is "280KB" but when I try on publish output file size is "296KB" Tested on .net core 2.0 and VS 2017 回答1: The output in bin/[Configuration] is only meant to be used for local development. Together with the runtimeconfig.dev.json this file specifies the dependency closure of your build output and references are resolved from your local NuGet package cache. If you copy the build output to another machine/user, it will not work. For

Why the “.deps.json” file on release folder and publish output folder size are difference

左心房为你撑大大i 提交于 2021-02-05 11:52:30
问题 I build on project and checked on release folder size is "280KB" but when I try on publish output file size is "296KB" Tested on .net core 2.0 and VS 2017 回答1: The output in bin/[Configuration] is only meant to be used for local development. Together with the runtimeconfig.dev.json this file specifies the dependency closure of your build output and references are resolved from your local NuGet package cache. If you copy the build output to another machine/user, it will not work. For

error MSB4018 in vs2017: The “SignFile” task failed unexpectedly

拈花ヽ惹草 提交于 2021-02-05 08:10:48
问题 I have a ppt2013 plugin solution with vsto, developer machines with vs 2017 installed.When I build, it comes the signFile error. I've installed .Net framework 4.5.1 targeting pack .Net framework 4.5.1 SDK .Net framework 4.5.2 targeting pack .Net framework 4.6 SDK .Net framework 4.6 targeting pack .Net framework 4.6.1 targeting pack .Net framework 4.6.2 SDK .Net framework 4.6.2 targeting pack Does anyone have a good idea to solve the error? > detail: D:\Program Files (x86)\Microsoft Visual >

Use a Content File from a .NET Standard assembly in a WPF application

删除回忆录丶 提交于 2021-02-05 07:43:37
问题 I want to embed a file in a .NET Standard assembly and use it in XAML in a WPF app. If you set the build action to Resource it is very easy to use the embedded file in other assemblies, but you have to use <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> and <UseWPF>true</UseWPF> to be able to use the Resource build action like so: <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> <UseWPF>true</UseWPF> </PropertyGroup> <ItemGroup> <Resource Include="Resources\Image.png" /> <

Disable transitive PackageReference dependency for a specific MsBuild project

本秂侑毒 提交于 2021-02-04 19:36:08
问题 I am migrating an old style MsBuild csproj project to using PackageReference format and have run into a problem with transitive dependencies. Consider the following Project A reference NuGet package B and C, each containing one single assembly using PackageReference. On Build Project A uses IL merge to incorporate B as public symbols in the A assembly and C as internalized symbols. Project D have a project reference to A. The transitive dependencies case D to reference A, B and C. When

Substitute for $(SolutionDir) in Azure DevOps CI Pipeline

╄→尐↘猪︶ㄣ 提交于 2021-01-29 20:15:53
问题 I have the following situation: A SQL project in which i have a nuget package installed. This package (merely a PS script) is responsible for unpacking the DACPACs that the DB requires, using references to paths relative to the solution folder (to find the packages/ and dacpacs/ folders and to browse through the projects which it extracts from the .sln file). This is called as a pre-build event. When building the entire solution, the $(SolutionDir) is defined, as expected (locally and ADO).

MSBuild on Centos returns “The imported project ”/Microsoft.Cpp.Default.props“ was not found”

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-29 11:41:06
问题 I'm trying to build a VS project in CentOS. I installed dotnet-sdk-2.2 via yum install dotnet-sdk-2.2 . When executing dotnet msbuild myproj.vcxproj I get: Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. mtproj.vcxproj(19,3): error MSB4019: The imported project "/Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Googling

How to create a Reference Assembly with Visual Studio 2017

痞子三分冷 提交于 2021-01-29 10:04:54
问题 I'm trying to create a Reference Assembly with Visual Studio 2017 and not with the command line. I've created a new class library project using Visual Studio 2017 and I've modified the constructor of the default class like this: using System; namespace ReferenceAssembly { public class Class1 { public Class1() { throw new Exception("Hello World"); } } } As I want a reference assembly, I hope the constructor's implementation like throw null and not throw new Exception("Hello World"); If I

Fixing the “Duplicate 'Compile' items were included.” error in Visual Studio

a 夏天 提交于 2021-01-29 06:55:15
问题 This is a very annoying VS error, I'm on VS 2019 16.8.1 I spend a lot of time fixing it: Duplicate 'Compile' items were included. The .NET SDK includes 'Compile' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultCompileItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'Program.cs' Service.Host