Skip to content

Commit 24fe3c9

Browse files
authored
Merge pull request #18 from TALXIS/users/tomas.prokop/pp-solution-slnissues
Update InitializeSolution.ps1
2 parents 7ad4cd8 + e886577 commit 24fe3c9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Dataverse/templates/pp-solution/.template.config/template.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"inRoot": true
6969
},
7070
"actionId": "D396686C-DE0E-4DE6-906D-291CD29FC5DE",
71-
"continueOnError": false
71+
"continueOnError": false,
72+
"primaryOutputIndexes": "0"
7273
},
7374
{
7475
"actionId": "3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
@@ -86,4 +87,4 @@
8687
"description": "Removing template files"
8788
}
8889
]
89-
}
90+
}

src/Dataverse/templates/pp-solution/.template.scripts/InitializeSolution.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cd "SolutionLogicalNameExample"
77
Rename-Item -Path .\src -NewName Declarations && Remove-Item .gitignore -Force
88

99
# Find the .cdsproj file and read it as XML
10-
$csproj = Get-ChildItem -Path . -Filter *.cdsproj | Select-Object -First 1
10+
$csproj = Get-ChildItem -Path . -Filter *.cdsproj | Select-Object -First 1https://github.com/TALXIS/tools-devkit-templates/tree/master
1111
[xml]$xml = Get-Content $csproj.FullName -Raw
1212

1313
# Rename the solution component folder in .cdsproj and
@@ -18,6 +18,9 @@ $propertyGroup.SolutionRootPath = 'Declarations'
1818
$newElement = $xml.CreateElement('DefaultProjectTypeGuid', $xml.Project.NamespaceURI)
1919
$newElement.InnerText = 'FAE04EC0-301F-11D3-BF4B-00C04F79EFBC'
2020
$propertyGroup.AppendChild($newElement) > $null
21+
$newElement2 = $xml.CreateElement('ProjectTypeGuids', $xml.Project.NamespaceURI)
22+
$newElement2.InnerText = 'FAE04EC0-301F-11D3-BF4B-00C04F79EFBC'
23+
$propertyGroup.AppendChild($newElement2) > $null
2124

2225
# Override the default Publish target to prevent errors when running publish on .sln file
2326
$targetElement = $xml.CreateElement('Target', $xml.Project.NamespaceURI)
@@ -51,4 +54,4 @@ Move-Item -Path "SolutionLogicalNameExample\*" -Destination . -Force
5154
Remove-Item -Path "SolutionLogicalNameExample" -Force
5255

5356
# The new project is automatically added to the Visual Studio solution by the templating engine
54-
# This would be an alternative: dotnet sln ../../ add SolutionLogicalNameExample.cdsproj"
57+
# This would be an alternative: dotnet sln ../../ add SolutionLogicalNameExample.cdsproj"

0 commit comments

Comments
 (0)