Comments (2)
I have not experienced VS2022 setting a file build action to None by default.
I found this StackOverflow item by Googling but it is old and I never like messing around with the registry. https://stackoverflow.com/questions/747844/default-build-action-for-a-filetype
It might be worth you experimenting with creating new projects and adding various file types and immediately seeing what the settings are in Properties window and comparing that to the .csproj
file.
For example, adding a C# class file named SecurityHeadersMiddleware.cs
to an ASP.NET Core project should default its Build Action to C# compiler and no entry for it should be made in the .csproj
file. But if the Build Action for that file is changed to None then the following entries are added to the .csproj
file:
<ItemGroup>
<Compile Remove="SecurityHeadersMiddleware.cs" />
</ItemGroup>
<ItemGroup>
<None Include="SecurityHeadersMiddleware.cs" />
</ItemGroup>
I will think about how to add a section to the next edition about build actions, especially in ASP.NET Core projects, since it'd be a useful topic for all readers to be aware of.
from cs11dotnet7.
OK, we might as well write this one off. I'll try to keep an eye on the properties when I add a new file to a project.
from cs11dotnet7.
Related Issues (20)
- Packt.Shared library not used for using Product type HOT 1
- Chapter 12: Creating a class library for entity models using SQLite' help needed. HOT 4
- Page 244 init-only properties HOT 1
- .Net standard is legacy but is still used? HOT 3
- Fix to the newer versions of Microsoft.Configuration.Extensions HOT 1
- Exercise 15.2 HOT 6
- No OmniSharp: Select Project HOT 5
- "Value" setting is also needed in appsettings.json, Chapter 04 switch trace levels HOT 5
- Exception when logging source code - chapter 4 HOT 1
- No instructions on how to create a unit test app HOT 5
- How GAC lead to issue if an app needs a specific version ? HOT 2
- Pattern Matching with Regular Expressions HOT 1
- Refactoring the query cause an exception HOT 4
- Addin `Model` into the Razor page cause error HOT 5
- Page 59 6th paragraph
- Page 149 HOT 2
- Exercise Solutions - Where are they? HOT 1
- Relational pattern + property pattern example missing decimal literal value suffix "M" HOT 1
- Sentence out of place in chapter 7 HOT 1
- Scaffolding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs11dotnet7.