All Projects → Cysharp → CsprojModifier

Cysharp / CsprojModifier

Licence: other
CsprojModifier performs additional processing when Unity Editor generates the .csproj.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to CsprojModifier

Awesome Vscode
🎨 A curated list of delightful VS Code packages and resources.
Stars: ✭ 19,659 (+25431.17%)
Mutual labels:  visualstudio
nettle
Unofficial Nettle with added custom native Visual Studio project build tools. Nettle: Nettle is a cryptographic library that is designed to fit easily in more or less any context.
Stars: ✭ 19 (-75.32%)
Mutual labels:  visualstudio
MvsSln
🧩 Customizable VisualStudio .sln parser, Complex support of the projects (.vcxproj, .csproj., …), Pluginable lightweight r/w handlers at runtime, and more …
Stars: ✭ 86 (+11.69%)
Mutual labels:  visualstudio
EncodingNormalior
规范化文件编码。Make the file's encoding standard.
Stars: ✭ 58 (-24.68%)
Mutual labels:  visualstudio
vscode-in-docker
Run VSCode inside of a Docker Container
Stars: ✭ 22 (-71.43%)
Mutual labels:  visualstudio
posh-vs
Makes Visual Studio command line tools available in PowerShell
Stars: ✭ 27 (-64.94%)
Mutual labels:  visualstudio
CppBuildTasks
Build C++ software with vcpkg and CMake (with CMakeLists.txt or CMakeSettings.json). Samples provided use both self-hosted or Microsoft hosted agent, using Docker and Pipeline Caching as well. The same tasks are available as GitHub actions at https://github.com/lukka/run-cmake https://github.com/lukka/run-vcpkg -=-
Stars: ✭ 26 (-66.23%)
Mutual labels:  visualstudio
WebApiStartTemplate
Web API Visual Studio Template.
Stars: ✭ 15 (-80.52%)
Mutual labels:  visualstudio
flutter plugin appcenter
Flutter plugins for accessing Visual Studio App Center services.
Stars: ✭ 55 (-28.57%)
Mutual labels:  visualstudio
vs-editor-api
Microsoft Visual Studio Editor API definitions
Stars: ✭ 109 (+41.56%)
Mutual labels:  visualstudio
unity-scripting-upgrade
Samples demonstrating what's possible with Unity 2017.x (and newer) scripting runtime upgrades
Stars: ✭ 46 (-40.26%)
Mutual labels:  visualstudio
CUDAfy.NET
CUDAfy .NET allows easy development of high performance GPGPU applications completely from the .NET. It's developed in C#.
Stars: ✭ 56 (-27.27%)
Mutual labels:  visualstudio
DLL-INJECTOR
I created a dll injector I am going to Open source its Code. But remember one thing that is any one can use it only for Educational purpose .I again say do not use it to damage anyone's Computer.But one thing if you are using it for some good purpose like to help someone who really need help then I permit you to use it.
Stars: ✭ 14 (-81.82%)
Mutual labels:  visualstudio
Template10
Making Windows 10 apps great again
Stars: ✭ 1,420 (+1744.16%)
Mutual labels:  visualstudio
Student-Information-Manage-System
学生信息管理系统
Stars: ✭ 19 (-75.32%)
Mutual labels:  visualstudio
FFmpeg
Unofficial FFmpeg with added custom native Visual Studio project build tools. FFmpeg: A complete, cross-platform solution to record, convert and stream audio and video.
Stars: ✭ 479 (+522.08%)
Mutual labels:  visualstudio
fantomas-for-vs
Visual Studio Formatter for F#
Stars: ✭ 43 (-44.16%)
Mutual labels:  visualstudio
libssh
Unofficial LibSSH with added custom native Visual Studio project build tools. LibSSH: Mulitplatform C library implementing the SSHv2 and SSHv1 protocol for client and server implementations.
Stars: ✭ 21 (-72.73%)
Mutual labels:  visualstudio
SlnMerge
SlnMerge merges the solution files when generating solution file by Unity Editor.
Stars: ✭ 91 (+18.18%)
Mutual labels:  visualstudio
gmp
Unofficial GMP with added custom native Visual Studio project build tools. GMP: GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers.
Stars: ✭ 61 (-20.78%)
Mutual labels:  visualstudio

CsprojModifier

CsprojModifier improves the developer experience in Visual Studio and Rider by performing additional processing when Unity Editor generates .csproj.

日本語

CsprojModifier provides following features:

  • Insert additional projects as Import elements into generated .csproj
  • Add analyzer references to generated .csproj
    • Disabled if you are using Rider or Visual Studio Code with Unity 2020.2 or later

Table of Contents

Works with

  • Unity Editor 2019.4 (LTS) or later
  • Visual Studio 2019 or Rider

Install

Add the package via git from Package Manager.

If you are using Unity 2019.1 or later, you can use Package Manager to install a package via git.

https://github.com/Cysharp/CsprojModifier.git?path=src/CsprojModifier/Assets/CsprojModifier

Features

Insert additional projects as Import elements into generated .csproj

Add references to additional project files (.props or .targets) to the generated .csproj using Import element. This enables you to add files to the project, add references, and so on.

Note: .csproj is only used in IDEs such as Visual Studio and Rider, and does not affect the actual compile time by Unity Editor.

Example

For example, you can create the following file YourAwesomeApp.DesignTime.props and import it to use BannedApiAnalyzer.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Analyzer Include="Assets/Plugins/Editor/Analyzers/Microsoft.CodeAnalysis.BannedApiAnalyzers.dll" />
    <Analyzer Include="Assets/Plugins/Editor/Analyzers/Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.dll" />
  </ItemGroup>
  <ItemGroup>
    <AdditionalFiles Include="$(ProjectDir)\BannedSymbols.txt" />
  </ItemGroup>
</Project>

BannedApiAnalyzer expects BannedSymbols.txt as AdditionalFiles to be included in the project, so adding it this way will work.

Inject the contents of additional project files (.props, .targets) directly instead of importing them

If you specify an insert position Append Content or Prepend Content as the insertion position, CsProjModifier will read the XML file and inject the elements directly into .csproj.

<!-- * Example: `Prepend: MyApp.Unity.props` -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--MyApp.Unity.props:HASH-->
  <Import Project="MyApp.Unity.props" />

  <!-- .csproj content generated by Unity Editor -->
  <!-- ... -->
</Project>

<!-- * Example: `Prepend Content: MyApp.Unity.props` -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--MyApp.Unity.props:HASH-->
  <ItemGroup>
    <!-- ... -->
    <!-- ... -->
    <!-- ... -->
  </ItemGroup>

  <!-- .csproj content generated by Unity Editor -->
  <!-- ... -->
</Project>

Add analyzer references to generated .csproj

NOTE: Disabled this feature if you are using Rider or Visual Studio Code with Unity 2020.2 or later. Unity Editor has Roslyn Analyzer IDE support.

Roslyn analyzers are supported in Unity 2020.2 or later. However, currently, Roslyn analyzers are not included in .csproj, and those are only used at compile time.

The extension will insert Analzyer element into .csproj when generating the project file. As a result, you can run Roslyn Analyzer when editing code in Visual Studio. (of course, you can use it before 2020.2!)

How to use

Add Roslyn Analyzer to your project in the same way that it is supported in 2020.2.

  • Add the Roslyn analyzer libraries
  • Uncheck all target platforms in the Plugin inspector
  • Add Asset Label RoslynAnalyzer to the libraries

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].