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

Automated builds #15

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Automated builds #15

wants to merge 7 commits into from

Conversation

KoalaBear84
Copy link
Contributor

@KoalaBear84 KoalaBear84 commented Mar 18, 2021

  • Migrate packages.config to PackageReference
  • Add BuildCommon.targets for make AssemblyVersion change possible

Needed to change some things in the Resources part, because now all is merged automatically into a single file.

There is still a problem though, because I and GitHub do not have the "leandro.pfx"file. I have no idea if that can be fixed somehow.. Would be a pity if that is a showstopper for automated builds.

So I tested it with:

  <PropertyGroup>
    <SignAssembly>false</SignAssembly>
  </PropertyGroup>

You can test it locally by executing:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\amd64\MSBuild.exe" -t:restore,build,ILMerge -p:Configuration=Release -p:OutputPath=../TaskbarMonitor-win-x64/ -p:VersionAssembly=1.2.3.4

You might need to change the MSBuild.exe location, because I'm using the Visual Studio Preview.

- Migrate packages.config to PackageReference
- Add BuildCommon.targets for make AssemblyVersion change possible
@KoalaBear84 KoalaBear84 mentioned this pull request Mar 18, 2021
@leandrosa81
Copy link
Owner

To be honest with you, I don't know why the assembly is signed at all. Maybe I thought it would be necessary, since it is marked as "Com-visible" 😂
I have already removed it on my development build and everything is working fine. I will also study a little more your pull request to learn about it, but will soon merge it. Thank you again.

@KoalaBear84
Copy link
Contributor Author

OOPS! I see the installer doesn't work yet. I thought it did because I already had it.

I ILMerge-d it all, didn't test, need to change it that it copies it from the .exe file, so it reads the ILMerge-d file from it.

So, until then, don't merge it 🙃

@KoalaBear84
Copy link
Contributor Author

KoalaBear84 commented Mar 23, 2021

Yes, now it should be good!

** Sorry, I'm currently testing and see that I referenced a file hardcoded, but should be used as a link **

I'll send another update when also that is fixed 😬

Grr. I HATE GitHub Actions, it's very hard to find why it doesn't 'find' the $(ILMergeConsolePath) when building a project directly (in GitHub), but it does work when you build it all, but then I have other issues... Sometimes simple things are hard...

@KoalaBear84
Copy link
Contributor Author

Sorry for all the mess :)

It didn't cooperate with me. But finally I guess it is fixed. If you build it in Release, it will output the final executable in the "TaskbarMonitor-win-x64" folder. Same when you tag the releases as you already do like "v1.2.3.4" and also changed that it uses the version from the DLL for the uninstaller.

All should be good, now you can also test it without custom command.

@KoalaBear84
Copy link
Contributor Author

Found out that it didn't always build correctly when Newtonsoft.Json 12 wasn't on the build machine, so added an expicit nuget restore, seems to fix it. Although msbuild should do that too, but that doesn't look like that works as expected.

@KoalaBear84
Copy link
Contributor Author

Could you try to check this out? After this, you can just tag the code starting with "v", push it to GitHub and it will automatically build and release it.

@KoalaBear84
Copy link
Contributor Author

Bump 😂

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

Successfully merging this pull request may close these issues.

None yet

2 participants