-
-
Notifications
You must be signed in to change notification settings - Fork 335
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 build #58
Comments
I try write a demo: DevelopmentPReomteM is written in the CSharp, UI power by WPF. EnvironmentHere is what you need to setup a development environment:
Build |
Thanks. I will move this into its own file on repo and make automated build from CLI. |
This is not enough and not precise. VS comes with bunch of modules. This one requires:
|
Looks like even that is not enough. Reference is still missing on all projects Old dotNet is horror. |
Sorry, I forgot it needs Win10 SDK support. Here is all I have on my workstation in company (can't find a button for turn VS2019 installer UI into english): |
I managed to build it using the following steps choco install visualstudio2019-workload-universal
choco install windows-sdk-10-version-1809-all
$lastSdkVersion = Get-ChildItem "${Env:ProgramFiles(x86)}\Windows Kits\10\Include" | Sort-Object -Descending | Select-Object -First 1 -Expand Name
# This is added to PRM.Core and PRemoteM csproj files
"<PropertyGroup>
<TargetPlatformVersion>${lastSdkVersion}</TargetPlatformVersion>
</PropertyGroup>" Now, I need to test this in the sandbox and with VS express. The point is to find minimal set of dependencies. |
I keep getting this error when trying to build PRemoteM in SandBox:
Core builds fine. I succeeded to compile it but not sure how, can't reproduce it easily. Will look into it some more... |
I pushed this to branch What I am trying can be accomplished locally this way:
Last command will complain if you don't have sandbox installed and show you command to do it. After that it does this:
You can now open VS2019 in sandbox and try to build it. Project is available on Desktop. Those are the deps so far and VS builds it after some interventions.
What is the point of all thisThe point is to have locally reproducible build. This will be used in CI pipeline (on any system, not necessarily GH) instead of magic we have now. Build simply becomes This can also be used to setup dev environment on empty machine. |
BTW, on my own machine Here is the error:
notice that your local folder |
I think I found the problem:
When this is set to Since this is problematic, shell we disable it ? When one does that, it adds dummy manifest file in csproj which doesn't exist on file system and next error is:
Just by deleting Properties\app.manifest file within VS makes it work then (alternative would be to add manifest on your own in the project without any autogeneration and funky magic) |
Can you check if above setting works for you and if so, please commit new PRemoteM.csproj file. |
BTW, the SqlXML assembly is present on the SandBox system, and even if I add it among references it changes nothing.... |
After this change only your key is problematic from CLI:
This doesn't happen when building within VS for some reason... Maybe we could remove the installer altogether :-) If you wanna keep that, any secrets will have to go to to specific place which is IMO something we should avoid if possible as secret will have to be obtained from some type of vault during the build. |
Found another err, this time in R2Win32 configuration (Debug works fine):
Those are easily fixed using VS option Remove and sort usings in 2 mentioned files, then |
So, to recap all above :-)
|
wow a lot of great job... 1. Remove unused usings in App.xaml.cs and ViewModel\VmServerListPage.cs
but using System.Windows is do needed in VmServerListPage.cs App.xaml.cs, and I dont think the unused usings will cause this build problem. BTW here is what unused using 2. Remove click once options in PRemoteM.csproj and remove dummy manifest from csproj or just add it again.
I dont even know when I enable it :(, And I find it would be useless in PRM according to wiki since we publish release by 7z package and Microsoft store. I will get it disabled
[WIP] I have to go out now, check it latter.But I have no impression of this file as well 3. Remove or fix installer project so that it doesn't require your local certificate.certificate is required so that it can publish to microsoft store, do you know how any approch for microsoft store package build into CI? OR we can add a dummy certificate for CI build to sign msix, push it to git, with it CI can build a msix that can be insatlled only if the user install the dummy certification, check: https://www.advancedinstaller.com/install-test-certificate-from-msix.html OR we may ignor the build msix package in CI, CI will only offering the WIn32 exe release. |
That one isn't removed, those that got removed are Windows.Application.Store, System.Windows.Data, System.ComponentModel, System.Diagnostics.
I know :-). I am not sure what is going on here, but that action solved it for me and since its repeatable, you can try it on your own. I noticed once for that error that it was enough to just hover with mouse over the error line, and the error would disappear after that in VS error window ?! Didn't analyze it more.
When you deselect click once, it is added automatically by VS in csproj, but not in file system
I am up for that one as I personally think almost nobody will use this from Store (maybe I am wrong, but the target audience for store are not IT professionals). OK, let me try to ignore it in CI until we have a way to use secrets vault. BTW, Installing and starting a sandbox on your local machine should be trivial, you should check it out yourself. I will ofc document everything once its done but If you need any more info now let me know (some notes are at https://github.com/VShawn/PRemoteM/issues/58#issuecomment-761540765) |
Signed-off-by: Shawn <singlex@foxmail.com>
Nope, in facte It is quite difficult for me since we have a powerful firewall that make me a hard way to connect to the international networks.
Over 300 downloads from Store since 2020.12.01, impressive |
God damn... I'll think of something... if possible.
OK, I stand corrected :) BTW, did you fixed the manifest problem ? I see you removed unused usings. |
I uploaded app.manifest, did it can be treated as fixed? https://github.com/VShawn/PRemoteM/blob/dev/PRemoteM/Properties/app.manifest |
I just checked, and now it builds in VS2019 community without problems in Debug mode. In Win32 mode there is an erorror: I committed a fix now on Here is a transcript: build.log |
So, all issues are now solved except automation of Store build but that is for some other topic. Now I need to see how/where to host this, and to avoid provisioning each time as it takes 15-20 minutes to install all, and there is that firewall thingy... BTW, I noticed my R2Win32 build has 2 DLLs then what you publish:
|
congratulations 👍 , it finally works. Interop.MSTSCLib.dll this two libs is needed by RDP, genertaed by windows. All apps that support RDB need them. |
That is strange.... I don't have those 2 files in my build for some reason. I tested RDP in Sandbox and it works without them! I searched entire sandbox drive for them and they are not there. |
Signed-off-by: Shawn <singlex@foxmail.com>
We should have document such as DEVEL.md that should provide reproducible way to setup up local environment.
It should contain machine prerequisites, along with any procedure required to build the app.
The text was updated successfully, but these errors were encountered: