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

App crash on startup - BEX #905

Closed
GeekJosh opened this issue Dec 16, 2016 · 1 comment
Closed

App crash on startup - BEX #905

GeekJosh opened this issue Dec 16, 2016 · 1 comment

Comments

@GeekJosh
Copy link

My app is installed successfully and can be executed from the version folder with no problem, updates work as expected.

However, trying to launch the app from the shortcut created by Squirrel causes the app to instantly crash with a BEX exception.

Any ideas how to fix this?

@GeekJosh
Copy link
Author

GeekJosh commented Dec 16, 2016

It turns out the issue was related to Revision numbers as per this existing issue: #892

If anyone else is using a build script to generate new NuGet packages, this alternative method will drop the revision number from the package:

<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'">
    <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
      <Output TaskParameter="Assemblies" ItemName="myAssemblyInfo" />
    </GetAssemblyIdentity>
	<PropertyGroup>
		<Version>@(myAssemblyInfo->'%(Version)')</Version>
	</PropertyGroup>
	<ItemGroup>
		<Version Include="$(Version)" />
		<Major Include="$(Version.Split('.')[0])" />
		<Minor Include="$(Version.Split('.')[1])" />
		<Build Include="$(Version.Split('.')[2])" />
		<Revision Include="$(Version.Split('.')[3])" />
	</ItemGroup>
    <Exec Command="nuget pack myApp.nuspec -Version @(Major).@(Minor).@(Build) -Properties Configuration=Release -OutputDirectory $(OutDir) -BasePath $(OutDir)" />
    <Exec Command="squirrel --releasify $(OutDir)myApp.@(Major).@(Minor).@(Build).nupkg" />
  </Target>

(thanks to this post on StackOverflow: http://stackoverflow.com/a/29425268/4546999)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant