netcore-blueprint 0.0.60 → 0.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -263,13 +263,14 @@ function addModuleReferencesToHostApi(moduleName, hostApiCsprojPath) {
263
263
  .map(r => ` <ProjectReference Include="${r}" />`)
264
264
  .join('\n');
265
265
 
266
- // 🔍 Find ItemGroup that already contains ProjectReference
267
- const projectRefItemGroupRegex = /<ItemGroup>[\s\S]*?<ProjectReference[\s\S]*?<\/ItemGroup>/;
266
+ // 🔥 Find ItemGroup that has ProjectReference BUT NOT PackageReference
267
+ const projectOnlyItemGroupRegex =
268
+ /<ItemGroup>(?:(?!<PackageReference)[\s\S])*?<ProjectReference[\s\S]*?<\/ItemGroup>/;
268
269
 
269
- const match = content.match(projectRefItemGroupRegex);
270
+ const match = content.match(projectOnlyItemGroupRegex);
270
271
 
271
272
  if (match) {
272
- // ✅ Append to existing ProjectReference ItemGroup
273
+ // ✅ Append to correct ProjectReference-only ItemGroup
273
274
  const originalGroup = match[0];
274
275
 
275
276
  const updatedGroup = originalGroup.replace(
@@ -279,9 +280,9 @@ function addModuleReferencesToHostApi(moduleName, hostApiCsprojPath) {
279
280
 
280
281
  content = content.replace(originalGroup, updatedGroup);
281
282
 
282
- console.log(`✅ Appended ProjectReference to existing ProjectReference ItemGroup`);
283
+ console.log(`✅ Appended to ProjectReference-only ItemGroup`);
283
284
  } else {
284
- // 🆕 No ProjectReference ItemGroup create new one
285
+ // 🆕 Fallback: create new clean ProjectReference ItemGroup
285
286
  const newItemGroup = `
286
287
 
287
288
  <ItemGroup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netcore-blueprint",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "A custom project blueprint",
5
5
  "main": "create.js",
6
6
  "bin": {