Skip to main content

All Questions

Tagged with
1 vote
2 answers
78 views

Directory.Build.props only respected when building .sln file

When I build my projects with the MyConfig target, I want the code to be optimized, and I don't want any .pdb files. To achieve this, I have created a Directory.Build.props file like this in the root ...
mortenbock's user avatar
1 vote
1 answer
37 views

Is it possible to attach Visual Studio Code debugger using System.Diagnostics.Debugger.Launch()?

The context involves trying to debug a Fody addin (MsBuild task). Using System.Diagnostics.Debugger.Launch(); only prompts me with Visual Studio debuggers.
Romain Hautefeuille's user avatar
0 votes
0 answers
25 views

Facing issue using Msbuild for building .NET Core project on Windows 2012 server

Our application is developed on .NET 6 framework and when we tried to use this command in a .bat file and ran on the local system, we are able to build solution and everything is working fine. When we ...
AMDI's user avatar
  • 963
0 votes
0 answers
12 views

How can I build a project if the build machine doesn't have the SDK for one of the (unused) target frameworks of a library?

I have an ASP.NET Core project that targets .NET 5.0. That project depends on a library that targets .NET Standard 2.1, .NET 5.0 and .NET 8.0. When I build the project on a build machine that only has ...
Simone's user avatar
  • 1,315
0 votes
1 answer
55 views

.NET 8.0 Project fails build Could not load System.Runtime - Reference Assemblies should not be loaded for execution

I have a project that is multi-targeting net8.0-windows and net48. In both configurations it has no warnings or errors. It builds fine in net48, but when I try to build the project in net8.0-windows ...
sfaust's user avatar
  • 2,285
0 votes
1 answer
239 views

AzureDevops build pipeline gets cancelled due to time out during donet build command

I have a build pipeline that build my .net 5 solution projects in Azure Devops. It was working fine till now, but has recently started failing in the build stage due to time out. The build command ...
Mustafa's user avatar
  • 204
0 votes
1 answer
55 views

How to successfully build a Microsoft.Dotnet.Wpf.sln repository downloaded from GitHub at your home PC?

I am trying to build a Microsoft.Dotnet.Wpf.sln which I downloaded from GitHub here. I installed Visual Studio 2022 Preview as mentioned in the instruction. Now when I open the Microsoft.Dotnet.Wpf....
Hemendr's user avatar
  • 918
0 votes
0 answers
32 views

MSBUILD .NET Core solution not setting the product version over the command line

I am currently setting the AssemblyVersion over the command line: & $msbuild "D:\Jenkins\workspace\Snarks\KPS.MAX graphics\KPS.MAX graphics - Compile\MainProj.sln" -r -m:7 -t:Build "...
Dan's user avatar
  • 35
0 votes
1 answer
100 views

How to create a multitarget NuGet package with the content file included just once

I'm writing a .NET binding project for an external c++ library. Wanted to include the library into the nupkg file, so the user just have to install the package to use it. The library is platform ...
python_kaa's user avatar
  • 1,076
0 votes
0 answers
24 views

Handling System package dependencies for packages in RestoreSources path

I have a project where I have PackageReference field for few packages. I am trying to restore and build this project on a ubuntu system(basically a docker image) with no internet access. I would like ...
user3443213's user avatar
2 votes
1 answer
81 views

How to define project dependency without copying or consuming output

I want to use a <ProjectReference> to ensure a dependency project builds first. I don't want to reference the project's output assembly or copy any files or transient dependencies of the ...
Sam Goldmann's user avatar
1 vote
1 answer
106 views

NET Core - Partial class created during the build process, is only used from the second run onwards

I have a Visual Studio 2019 solution and the projects it contains have been converted from .NET Framework 4.8 to NET Core 8. In VS2019, building the projects and the solution worked without any ...
Mirko369's user avatar
0 votes
3 answers
94 views

Use MSBuild to concatenate JavaScript files with regexes

I concatenate javascript in msbuild like this: <ItemGroup> <JsFiles Include="wwwroot/**/*.js" /> </ItemGroup> <ItemGroup> <JsLines Include="$([System.IO....
lonix's user avatar
  • 17.7k
0 votes
0 answers
51 views

.NET Single file - include files other than libraries (e.g. *.conf)

Is there any way in .NET 8 how to put a *.conf file in single file EXE? I need to bundle Firebird embedded in my application. Using IncludeNativeLibrariesForSelfExtract will include all Firebird dlls, ...
Ondřej Václavík's user avatar
0 votes
1 answer
766 views

Using Directory.Build.props to copy files from different projects to output dir

I have a solution with a few class libraries and a console project. Each one of the libraries have an Inputs dir next to the .csproj file with a bunch of files. I'm currently doing this in each one of ...
eduherminio's user avatar
  • 1,634

15 30 50 per page
1
2 3 4 5
36