Skip to content

Commit 288fa88

Browse files
authored
change project generator to work when using VS Code as a editor (#54)
* change project generator to work when using VS Code as a editor * update version number to 1.1.0
1 parent 0f0c2a5 commit 288fa88

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
exclude: "^.git$|/ProjectSettings/Packages/"
44
repos:
5-
- repo: https://github.com/pre-commit/mirrors-prettier
6-
rev: v3.0.2
5+
- repo: https://github.com/JoC0de/pre-commit-prettier
6+
rev: v3.5.3
77
hooks:
8-
- id: "prettier"
8+
- id: prettier
99
additional_dependencies:
10-
- prettier@v3.0.2
11-
- "@prettier/plugin-xml@3.2.0"
12-
- prettier-plugin-ini@v1.1.0
10+
- prettier@3.5.3
11+
- "@prettier/plugin-xml@3.4.1"
12+
- "prettier-plugin-ini@1.3.0"
1313
args:
14-
# change back to --plugin=@prettier/plugin-xml and --plugin=prettier-plugin-ini if https://github.com/prettier/prettier/issues/15141 is fixed
15-
# or try using .prettierrc.cjs see: https://github.com/scverse/scverse.github.io/pull/109/files
16-
- --plugin=file://%NODE_VIRTUAL_ENV%/Scripts/node_modules/@prettier/plugin-xml/src/plugin.js
17-
- --plugin=file://%NODE_VIRTUAL_ENV%/Scripts/node_modules/prettier-plugin-ini/dist/plugin.js
14+
- --plugin=prettier-plugin-ini
1815
files: Directory\.Build\.props$|(\.(json|xml|html|config|csproj|DotSettings|yaml|yml|js|md|xrml|xaml|css|editorconfig)$)
1916
- repo: local
2017
hooks:
@@ -38,9 +35,9 @@ repos:
3835
files: \.cs$
3936
pass_filenames: true
4037
require_serial: true
41-
stages: [commit, merge-commit]
38+
stages: [pre-commit, pre-merge-commit]
4239
- repo: https://github.com/pre-commit/pre-commit-hooks
43-
rev: v4.4.0
40+
rev: v5.0.0
4441
hooks:
4542
- id: trailing-whitespace
4643
exclude: \.(pdf|meta|prefab|shader|controller|asset|cginc|mat|unity|anim|shadergraph)$

src/UnityVisualStudioSolutionGenerator/Assets/Editor/ProjectFileGeneratorSdkStyle.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ protected override void WriteProjectFileInternal(XmlWriter writer, string output
6969
continue;
7070
}
7171

72+
// Unity's SDK style generator, used when VS Code is the active editor, has this settings we need to remove
73+
propertyGroup.Element(XmlNamespace + "EnableDefaultItems")?.Remove();
74+
propertyGroup.Element(XmlNamespace + "BaseIntermediateOutputPath")?.Remove();
75+
propertyGroup.Element(XmlNamespace + "IntermediateOutputPath")?.Remove();
76+
7277
propertyGroup.Element(XmlNamespace + "OutputPath")?.Remove();
7378
propertyGroup.Element(XmlNamespace + "ProductVersion")?.Remove();
7479
propertyGroup.Element(XmlNamespace + "SchemaVersion")?.Remove();

src/UnityVisualStudioSolutionGenerator/Assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.github-joc0de.visual-studio-solution-generator",
33
"displayName": "Unity Visual Studio Solution Generator",
4-
"version": "1.0.13",
4+
"version": "1.1.0",
55
"description": "Visual Studio Solution Generator with improved developer productivity especially when working with multi-package unity projects",
66
"unity": "2021.2",
77
"keywords": [

0 commit comments

Comments
 (0)