All Questions
2,006
questions
-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 ...
0
votes
0
answers
32
views
Exclude projects in nested folders while using dotnet build of solution file
Folder strucure of our project is below. While building the solution, we need to exclude some projects present. Please let me know if there is a way to exclude some projects while building a solution ...
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 ...
0
votes
0
answers
40
views
.Net 8 Project Reference Specify .net Version of Multi-Targeted Transitive Project Dependency
I have a .net6 sdk project that I need to upgrade to .net8 for some new functionality. It has some shared project libraries with other projects that are still .net6.
Project A includes Project B which ...
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 ...
0
votes
0
answers
22
views
Directory.Build.Props ignored for "old" .NET Projects
I'm trying to restructure our projects and one part was moving all versioning information into Directory.build.props.
This works for all projects which are .NET SDK style projects (many of them are ...
1
vote
1
answer
44
views
How to change targetframework based on Visual Studio version
I would like to support from .NET Standard 2.0 to .NET 8.0 every target in a projects. Currently
<TargetFrameworks>$(ExtraTargetFrameworks)netstandard2.0</TargetFrameworks>
is used along ...
0
votes
1
answer
58
views
How to create a MSBuild target that runs when any file under 2 specific folders have changed
Context
I have two input folders - A and B.
I have an output folder - C.
There is a target that takes files from A and B and creates a set of files based on the inputs in directory C. There is no ...
0
votes
0
answers
32
views
Why an unnecessary project is built when building a project?
I am building a project for several versions of the framework. And I need to output a message after building the release of each version, for this I use AfterTargets. But AfterTarget is triggered 3 ...
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 ...
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.
...
0
votes
1
answer
72
views
dotnet test command not finding Microsoft.TextTemplating.targets
I have this line inside my csproj
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TextTemplating\Microsoft.TextTemplating.targets" />
But ...
0
votes
1
answer
130
views
MSBuild outputting all files in uppercase
We are using Azure Devops to build our .NET projects and making use of the Visual Studio build task. Our build server has decided to start outputting all files in uppercase. This is causing subsequent ...
0
votes
0
answers
19
views
Compiles but doesn't publish executables or dll when running build through MSBuild on Jenkins
I have created a freestyle project on Jenkins to build a .NET Web API application that compiles but doesn't output any executables(.exe) or class library(.dll) after a successfull build. I have ...
1
vote
1
answer
77
views
Variable in Directory.Build.Props not working for old-style csproj format
I tried using Directory.Build.props to setup some variables for use with our different project types.
<Project>
<PropertyGroup>
<!-- For SDK style c# projects -->
&...