Skip to content

Commit dc1d4f2

Browse files
committed
Fix null reference exception when creating new WiX project.
1 parent 60c043c commit dc1d4f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Main/Base/Project/Src/Project/Behaviors/DotNetStartBehavior.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public override void ProjectCreationComplete()
114114
if (fx != null)
115115
UpdateAppConfig(fx);
116116
if (Project.OutputType != OutputType.Library) {
117-
if (DotnetDetection.IsDotnet45Installed() && fx.IsBasedOn(TargetFramework.Net45)) {
117+
if (fx != null && DotnetDetection.IsDotnet45Installed() && fx.IsBasedOn(TargetFramework.Net45)) {
118118
Project.SetProperty(null, Project.ActivePlatform, "Prefer32Bit", "True", PropertyStorageLocations.PlatformSpecific, true);
119119
} else {
120120
Project.SetProperty(null, Project.ActivePlatform, "PlatformTarget", "x86", PropertyStorageLocations.PlatformSpecific, true);

0 commit comments

Comments
 (0)