Skip to main content

All Questions

Tagged with
0 votes
0 answers
21 views

Packing multiple projects into singular NuGet package

I would like to pack a Roslyn source generator and another project that contains the attributes the source generator acts upon together into one NuGet package. To do this, I've decided that using a ...
dopr's user avatar
  • 1
-1 votes
0 answers
33 views

Problem building Windows Service project using CLI (C#)

I want to build a Windows Service project using CLI (dotnet or msbuild) to be able to make continuous delivery of a new project. No problem to build a Windows Application, but, if I use dotnet build ...
Shionigami's user avatar
0 votes
1 answer
22 views

Build a single project respecting solution-level configuration mappings

I have a solution (My.sln) with two projects App.csproj - application Lib.csproj - class library The App project references the Lib project via the <ProjectReference/> I have configuration ...
Serg's user avatar
  • 4,188
0 votes
0 answers
42 views

Build csproj on Visual Studio without building references

Lets say you have a solution with projects A and B. A needs to B be build at least once so in order to be built with MSBuild i need it to be some kind of reference to setup the order of build. But ...
TSDrake's user avatar
0 votes
1 answer
90 views

MAUI .NET 8 on Android - throwing an exception

I have created a new MAUI .NET 8 project and migrated the Xamarin forms project code. When I tried to run the project with the Android device with Visual Studio Windows, which threw the exception ...
Anitha v'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
3 votes
2 answers
66 views

Change default path of bin and obj folders in VS 2022

I would like to change the directory of the bin and obj folders created from build by Visual Studio 2022. For example, a project in this path : C:\Users\MyUserName\source\repos\SolutionName\...
Carlos Siestrup's user avatar
0 votes
1 answer
42 views

Can't get a "before build" target to work with MSBuild

I have a simple hello world console app with top level statements as follows: Console.WriteLine("Hello world"); I would like to experiment with automatically executing targets before the ...
user32882's user avatar
  • 5,656
1 vote
1 answer
45 views

MSBuild conditions: detect whether project file is built as project reference or standalone executable

I'm dealing with the NETSDK1152: Found multiple publish output files with the same relative path error while building a rather complex project. My project A depends on some classes in project B, both ...
Kile Kasmir Asmussen's user avatar
0 votes
2 answers
47 views

How To Get Nested TaskItem Metadata Values in MSBuild File?

I have an MSBuild TaskItem that contains metadata gathered from a JSON configuration. An example of a single piece of metadata would be %(Configuration.Object:Name) and in the case of arrays would be ...
Ken Garrett's user avatar
0 votes
1 answer
57 views

How do I force dotnet publish to use Release configuration on a solution with multiple modules

We have a central .NET solution that uses multiple modules which each have its own .csproj and .sln, currently they use .NET 7. I am trying to publish all of the modules and force them to all use ...
Eljimo's user avatar
  • 1
0 votes
1 answer
42 views

MSBuild: How to get project sdk version (TargetFramework) inside Directory.Build.props file?

I have been playing around with a few MSBuild properties inside a Directory.Builds.props of which the latest is changing location of obj/bin folders. By default the project output is put inside of sdk ...
dev01's user avatar
  • 157
1 vote
1 answer
57 views

Publishing WPF Project using command

When publishing my WPF project i normally use Visual Studio 22 by going to "Publish Selection", plugging in my settings (win-x86, any-cpu, self-contained). This works as expected, however i ...
Jannes's user avatar
  • 265
0 votes
0 answers
23 views

VSCode 'csproj' actions only if the target is Windows

I am helping refactor some code so that it builds on both Windows and Linux. All is well until an external, 3rd party, tool is needed. Under windows this has been copied to the output folder via some ...
jc508's user avatar
  • 95
0 votes
0 answers
37 views

C# Extern Aliases with 2 packages only working with 1 package

I have a simple setup where I have 2 nuget packges that share the same namespace. I'm trying to use aliases to reference both packages in 1 console app, but ensure I alias them so that I can use both. ...
aherrick's user avatar
  • 20.1k

15 30 50 per page
1
2 3 4 5
220