Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bug where the .dll filename was normalized when it shouldn't be in the Dockerfiles generated for Dot Net Core #909

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ func (t *DotNetCoreDockerfileGenerator) TransformArtifact(newArtifact transforme
IncludeBuildStage: selectedBuildOption == dotnetutils.BUILD_IN_EVERY_IMAGE,
BuildStageImageTag: defaultDotNetCoreVersion,
BuildContainerName: imageToCopyFrom,
EntryPointPath: childProject.Name + ".dll",
EntryPointPath: childProject.OriginalName + ".dll",
RunStageImageTag: targetFrameworkVersion,
IncludeRunStage: true,
CopyFrom: common.GetUnixPath(copyFrom),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (t *WinConsoleAppDockerfileGenerator) DirectoryDetect(dir string) (map[stri
continue
}
targetFrameworkVersion := configuration.PropertyGroups[idx].TargetFrameworkVersion
if !dotnet.Version4.MatchString(targetFrameworkVersion) {
if !dotnet.Version4And3_5.MatchString(targetFrameworkVersion) {
logrus.Errorf("console dot net tranformer: the c sharp project file at path %s does not have a supported framework version. Actual version: %s", csProjPath, targetFrameworkVersion)
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (t *WinSilverLightWebAppDockerfileGenerator) DirectoryDetect(dir string) (m
continue
}
targetFrameworkVersion := configuration.PropertyGroups[idx].TargetFrameworkVersion
if !dotnet.Version4.MatchString(targetFrameworkVersion) {
if !dotnet.Version4And3_5.MatchString(targetFrameworkVersion) {
logrus.Errorf("silverlight dot net tranformer: the c sharp project file at path %s does not have a supported framework version. Actual version: %s", csProjPath, targetFrameworkVersion)
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (t *WinWebAppDockerfileGenerator) DirectoryDetect(dir string) (map[string][
continue
}
targetFrameworkVersion := configuration.PropertyGroups[idx].TargetFrameworkVersion
if !dotnet.Version4.MatchString(targetFrameworkVersion) {
if !dotnet.Version4And3_5.MatchString(targetFrameworkVersion) {
logrus.Errorf("the c sharp project file at path %s does not have a supported framework version. Actual version: %s", csProjPath, targetFrameworkVersion)
continue
}
Expand Down Expand Up @@ -175,7 +175,7 @@ func (t *WinWebAppDockerfileGenerator) DirectoryDetect(dir string) (map[string][
continue
}
targetFrameworkVersion := configuration.PropertyGroups[idx].TargetFrameworkVersion
if !dotnet.Version4.MatchString(targetFrameworkVersion) {
if !dotnet.Version4And3_5.MatchString(targetFrameworkVersion) {
logrus.Errorf("webapp dot net tranformer: the c sharp project file at path %s does not have a supported framework version. Actual version: %s", csProjPath, targetFrameworkVersion)
continue
}
Expand Down Expand Up @@ -306,7 +306,7 @@ func (t *WinWebAppDockerfileGenerator) Transform(newArtifacts []transformertypes

if selectedBuildOption == dotnetutils.BUILD_IN_BASE_IMAGE {
webConfig := WebTemplateConfig{
BuildStageImageTag: dotnet.DefaultBaseImageVersion,
BuildStageImageTag: t.getImageTagFromVersion(dotnet.DefaultBaseImageVersion),
IncludeBuildStage: true,
IncludeRunStage: false,
BuildContainerName: imageToCopyFrom,
Expand Down Expand Up @@ -378,7 +378,7 @@ func (t *WinWebAppDockerfileGenerator) Transform(newArtifacts []transformertypes

webConfig := WebTemplateConfig{
Ports: selectedPorts,
BuildStageImageTag: dotnet.DefaultBaseImageVersion,
BuildStageImageTag: t.getImageTagFromVersion(targetFrameworkVersion),
IncludeBuildStage: selectedBuildOption == dotnetutils.BUILD_IN_EVERY_IMAGE,
IncludeRunStage: true,
BuildContainerName: imageToCopyFrom,
Expand Down
4 changes: 2 additions & 2 deletions types/source/dotnet/csproj.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
)

var (
// Version4 is the framework version pattern
Version4 = regexp.MustCompile("v4")
// Version4And3_5 is the regex to match against specific Dot Net framework versions
Version4And3_5 = regexp.MustCompile(`(v4|v3\.5)`)
// WebLib is the key library used in web applications
WebLib = regexp.MustCompile(`^System\.Web`)
// AspNetWebLib is the key library used in asp net web applications
Expand Down