enhanced Module Creator to allow developer to specify framework reference version so that modules can target any version including the local development environment
This commit is contained in:
@ -240,7 +240,20 @@ namespace Oqtane.Controllers
|
||||
text = text.Replace("[ServerManagerType]", moduleDefinition.ServerManagerType);
|
||||
text = text.Replace("[Folder]", folderPath);
|
||||
text = text.Replace("[File]", Path.GetFileName(filePath));
|
||||
text = text.Replace("[FrameworkVersion]", Constants.Version);
|
||||
if (moduleDefinition.Version == "local")
|
||||
{
|
||||
text = text.Replace("[FrameworkVersion]", Constants.Version);
|
||||
text = text.Replace("[ClientReference]", "<Reference Include=\"Oqtane.Client\"><HintPath>..\\..\\oqtane.framework\\Oqtane.Server\\bin\\Debug\\netcoreapp3.1\\Oqtane.Client.dll</HintPath></Reference>");
|
||||
text = text.Replace("[ServerReference]", "<Reference Include=\"Oqtane.Server\"><HintPath>..\\..\\oqtane.framework\\Oqtane.Server\\bin\\Debug\\netcoreapp3.1\\Oqtane.Server.dll</HintPath></Reference>");
|
||||
text = text.Replace("[SharedReference]", "<Reference Include=\"Oqtane.Shared\"><HintPath>..\\..\\oqtane.framework\\Oqtane.Server\\bin\\Debug\\netcoreapp3.1\\Oqtane.Shared.dll</HintPath></Reference>");
|
||||
}
|
||||
else
|
||||
{
|
||||
text = text.Replace("[FrameworkVersion]", moduleDefinition.Version);
|
||||
text = text.Replace("[ClientReference]", "<PackageReference Include=\"Oqtane.Client\" Version=\"" + moduleDefinition.Version + "\" />");
|
||||
text = text.Replace("[ServerReference]", "<PackageReference Include=\"Oqtane.Server\" Version=\"" + moduleDefinition.Version + "\" />");
|
||||
text = text.Replace("[SharedReference]", "<PackageReference Include=\"Oqtane.Shared\" Version=\"" + moduleDefinition.Version + "\" />");
|
||||
}
|
||||
System.IO.File.WriteAllText(filePath, text);
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Oqtane.Client" Version="1.0.3" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.3" />
|
||||
[ClientReference]
|
||||
[SharedReference]
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -31,7 +31,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Oqtane.Server" Version="1.0.3" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.3" />
|
||||
[ServerReference]
|
||||
[SharedReference]
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.3" />
|
||||
[SharedReference]
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user