Skip to main content

All Questions

Tagged with
1 vote
2 answers
77 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
0 votes
1 answer
54 views

How do I run npm build as part of dotnet publish

I have an ASP.NET Core 8 web project, where the client source code lives in a client folder. I also have an npm run build that will compile those client files, and copy the output to the wwwroot ...
mortenbock's user avatar
0 votes
0 answers
57 views

Why do I keep getting error NETSDK1152: Found multiple publish output files with the same relative path?

I have a Blazor Server .NET 7 solution with the main entry project called Web.csproj. There are other projects such as Api, WebApi, WebConstants etc... When I build this blazor server project in ...
MMDR's user avatar
  • 1
2 votes
1 answer
811 views

Error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target

I created simple ASP.NET Core project with default templates in Visual Studio 2022 using .NET 8.0 framework and pushed in to Azure repo (included the file .gitignore for Visual Studio) and created a ...
Aswin kumar's user avatar
0 votes
1 answer
51 views

Build Issue due to $(Platform) default value

We are facing build issue when we try to build .net project in custom project configuration, like Debug configuration we have added LinuxDebug as a configuration in project to target it for corss ...
Omkar's user avatar
  • 1
1 vote
1 answer
83 views

MsBuild DefineConstants from .pubxml doesnt work correctly

I have ASP.NET Core + Blazor app (default template) with 2 projects. When I create an IIS publish profile: <?xml version="1.0" encoding="utf-8"?> <!-- https://go.microsoft....
KeyKiller's user avatar
0 votes
1 answer
52 views

Copy folder on publish ASP.NET Core

I need to copy the Views folder to the publish folder (on publish), and I have this in my .csproj. (Note: I don't need to change the views on runtime, different usage) <Target Name="CopyViews&...
buga's user avatar
  • 1,056
0 votes
1 answer
196 views

Continuous Visual Studio errors on Debugging and Building project

This problem started a few days ago while I was working on my project. Up until then, I was not getting this error at all. Whenever I run "dotnet watch run" or launch the project from Visual ...
EddEnt's user avatar
  • 11
0 votes
0 answers
98 views

Why is there a long time before csc kicks off in my ASP.NET Core project with large dependencies?

My verbose compiler output for my asp.net core project looks like this: 15:35:04:191 1> C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /...
cooper_milton's user avatar
-1 votes
1 answer
338 views

Blazor Web App (.net 8 server) - Razor Component Library RCL as NuGet (Local Feed) w MainLayout style sharing

Updated after finding answer for future reference of those with issue What I was trying to do: Use MainLayout on my webapp to make use of the RCL's razor component to pass in a navmenu and use the ...
Alex Holmes's user avatar
0 votes
1 answer
110 views

The specified solution configuration is invalid

Using .NET Core 7 (SDK 7.0.402), I am running the command: dotnet build -c development But I get this error: Error MSB4126: The specified solution configuration "development|Any CPU" is ...
Miguel Moura's user avatar
  • 38.6k
0 votes
2 answers
439 views

How are Dockerfiles used by Visual Studio?

I am trying to create a simple ASP.NET Core web application with React (using the "ASP.NET Core with React.js" template). Further I want to containerize it. If I run the release ...
Stevie's user avatar
  • 419
0 votes
0 answers
144 views

Web.config file in Github with sensitive data

I want to know in what ways you are working with GitHub, when you have sensitive data in web.config (such as logins to databases and etc.), need to share with other team members about changes in this ...
user3616309's user avatar
0 votes
1 answer
183 views

Exclude dependee ASP.NET Core web project assets from publish

I have three ASP.NET Core 7 projects: Common: library project. Other projects depend upon it. Web: razor pages project. Depends on Common. Migrator: console project. Depends on Common, and Web (via ...
lonix's user avatar
  • 17.7k
0 votes
0 answers
372 views

dotnet publish - infinite loop

When running dotnet publish "{projectFilePath}" --configuration Release --output "{outputPath}", the build runs but freezes part-way(noted below). The same is true when executing ...
Eli Sternbach's user avatar

15 30 50 per page
1
2 3 4 5
14