@@ -8,7 +8,6 @@ public bool Generate(TemplateGenerationOptions options)
88 {
99 var projectName = options . Name ?? "LibraryProject" ;
1010 var outputDirectory = options . OutputDirectory ?? Directory . GetCurrentDirectory ( ) ;
11- var packageName = options . NuGetPackageName ;
1211 var nugetUsername = options . NuGetUserName ;
1312
1413 outputDirectory = Path . Combine ( outputDirectory , projectName ) ;
@@ -26,14 +25,7 @@ public bool Generate(TemplateGenerationOptions options)
2625
2726 var srcProjectDirectory = Path . Combine ( outputDirectory , "src" , projectName ) ;
2827 Directory . CreateDirectory ( srcProjectDirectory ) ;
29- if ( packageName is not null && packageName != projectName )
30- {
31- File . WriteAllText ( Path . Combine ( srcProjectDirectory , $ "{ projectName } .csproj") , string . Format ( CultureInfo . InvariantCulture , LibraryTemplateConstants . ProjectFileWithExplicitPackageId , packageName ) ) ;
32- }
33- else
34- {
35- File . WriteAllText ( Path . Combine ( srcProjectDirectory , $ "{ projectName } .csproj") , LibraryTemplateConstants . ProjectFile ) ;
36- }
28+ File . WriteAllText ( Path . Combine ( srcProjectDirectory , $ "{ projectName } .csproj") , LibraryTemplateConstants . ProjectFile ) ;
3729
3830 var testsDirectory = Path . Combine ( outputDirectory , "tests" ) ;
3931 var testsProjectDirectory = Path . Combine ( testsDirectory , $ "{ projectName } .Tests") ;
@@ -49,7 +41,7 @@ public bool Generate(TemplateGenerationOptions options)
4941 File . WriteAllText ( Path . Combine ( outputDirectory , "Directory.Build.props" ) , string . Format ( CultureInfo . InvariantCulture , LibraryTemplateConstants . DirectoryBuildPropsFile , options . NuGetUserName ?? "ADD_PACKAGE_AUTHOR_HERE" ) ) ;
5042 File . WriteAllText ( Path . Combine ( outputDirectory , "Directory.Packages.props" ) , LibraryTemplateConstants . DirectoryPackagesPropsFile ) ;
5143 File . WriteAllText ( Path . Combine ( outputDirectory , "LICENSE" ) , string . Format ( CultureInfo . InvariantCulture , LibraryTemplateConstants . LicenseFile , "ADD_COPYRIGHT_HOLDER_HERE" ) ) ;
52- File . WriteAllText ( Path . Combine ( outputDirectory , "README.md" ) , string . Format ( CultureInfo . InvariantCulture , LibraryTemplateConstants . ReadmeFile , packageName ?? projectName ) ) ;
44+ File . WriteAllText ( Path . Combine ( outputDirectory , "README.md" ) , string . Format ( CultureInfo . InvariantCulture , LibraryTemplateConstants . ReadmeFile , projectName ) ) ;
5345 File . WriteAllText ( Path . Combine ( outputDirectory , $ "{ projectName } .slnx") , string . Format ( CultureInfo . InvariantCulture , LibraryTemplateConstants . SlnxFile , projectName ) ) ;
5446 File . WriteAllText ( Path . Combine ( outputDirectory , "global.json" ) , LibraryTemplateConstants . GlobalJsonFile ) ;
5547 File . WriteAllText ( Path . Combine ( outputDirectory , "nuget.config" ) , LibraryTemplateConstants . NuGetConfigFile ) ;
0 commit comments