Possible to use the Windows Phone 8 Store Test Kit with Custom Build Configurations? - visual-studio-2012

I've got a custom build configuration setup in my V.S. 2012 Win Phone 8 solution (distinct Configurations other than just Debug and Release) and am using SQLite (which cannot be built against the AnyCPU Platform) and cannot find a way to run the test kit since it insists on a "Release + AnyCPU" build. Copying the contents of the actual output folder to "Bin\Release" doesn't seem to satisfy the test kit (nor did setting the output folder in the project file to "Bin\Release" for the appropriate configuration) and I can find no way to change the test kit settings/path. Is this simply impossible or am I just missing something?
I have read this post but it's less than helpful and also incomplete (that post doesn't say anything about custom build configurations). I have also sent negative feedback here asking a similar question (but of course that's unlikely to be replied to).
I was going to add "store-test-kit" and "custom-build-config" tags to this but don't have the reputation to do so so I've added them in this note instead in case it helps with future searches.
My solution combines a number of projects spanning from Windows 8 Desktop to Windows 8 Phone (and including DLLs and other supporting dependecy projects including SQLite). In order to build only what is needed I drastically customized my build configurations. So e.g. I have:
N-Dbg, N-Rls, N-Str and P-DBG, P-Rls, P-Str as build Configurations. These distingush from the Desktop ([N]ot phone) and [P]hone primary projects and the Dbg (debug) Rls (Release) and Str (Store) build sets. I have a distinct Str build so that the live store code bits are excluded from the Release build which also leaves out all the extra Debug features.
As complicated as it all sounds it works really quite well in practice, until I need to build a "Release" version. (And this is completely ignoring the platform part of the equation for which just selecting ARM might suffice, I really can't say because I have no good way to test it at the moment).
Ideally then what I want the Store Test Kit to test against is the P-Str build config. I tried setting the configuration to output that set of files to "Bin\Release" which is where a brand new standard build config puts "Release\Any CPU" builds, but the Store Kit didn't like it. It doesn't even list anything for a path to the XAP file that it's supposed to be testing.
After my initial post I did think to try making a new Release build config that was just setup the same as the P-Str build config but that also did not seem to make the Store Test Kit happy (though I admit that I am not 100% sure that I added the new build configuration completely accurately since it had been a long time since I created the custom config in the first place).
Does anyone out in the S.O. world have any experience with such a completely custom build configuration that might be able to help me out here?

I guess after almost a full year if no one has found a better way I'll take the advice to call this the answer...
I was very close with the idea of copying the files to the Bin\Release location but there were a couple missing pieces. First I had to add a Release+AnyCPU entry to the project file (even though I never actually use it) apparently so that the Store Test Kit knows where to look for the xap. Second, I had to be sure to rename the xap file in the Bin\Release folder to ProjName_Release_AnyCPU.xap. Once these things are done I can run the Test Kit.

Related

Xamarin Android+iOS builds failing on Azure Dev Ops

I have an xamarin mobile app with 3 projects. Shared, Android and iOS.
All 3 build perfectly fine locally but fail on Azure Dev ops pipeline.
iOS and Android only have 2 xmal views that are platform specific. The rest are located in Shared.
For both of the xmal views, all the errors are coming from the code behind cs files complaining that something doesn't exist in the current context. There are around 80 errors like the one below. The errors are identical on both platform builds.
Example error from Droid build:
Droid\Views(Filename).xaml.cs(26,13): error CS0103: The name 'InitializeComponent' does not exist in the current context
This build hasn't run for a while, around 8 months. It used to work fine and none of the views xmal/cs code has changed. I'm assuming a version is now misconfigured somewhere.
Both builds run on VS 2022 pipelines.
Both builds restore okay.
I have tried (Mostly suggestions from similar posts)
Adding restore argurment to the Build step.
Checking name spaces match
Adding a small change (whitespace) to the 2 xmal pages to force a change.
Removing the shared project reference and re-adding it.
I would be grateful for any suggestions or ideas.
Thanks in advance.
In past experience, if something works locally and not on the build server pipeline; this usually points to a discrepancy between both machines, and potentially their versions of given libraries.
If you run the pipeline off of a local machine as well, maybe confirm that all libraries installed on that machine match your local ones (XCode, android-sdk, etc.)
If you run the pipeline off of a hosted machine, it maybe that the hosted images needs to be updated to a newer one to keep up with the project.

Klocwork - how to scan cross-platform projects?

We have a project with a single code base which we build both on Windows and Linux. And we want to run Klocwork code analysis on both Windows and Linux. Currently our approach is:
We have set up one KW project in the web UI
Inject and build on Linux, push the results to the server, save the report
Inject and build on Windows, push the results to the server, save the report
It somehow works, but the problem is that latter scan effectively overwrites results of the first one. If we save report directly after push, then we can still have a saved copy, but if developers want to triage/analyze the hit which is present only in the first build (i.e. some Linux-specific code), then it's almost impossible because KW has already marked this hit as "obsolete" (because it was not present in Windows scan)
Having two projects is not really an option, because 90% of the code is shared and it will cause huge overhead of developers to triage the same hits twice.
There are multiple options to achieve your goal.
Option 1: There is a tab under projects called Builds. That can give you the build chain report. here you can see the reports of previous builds.
Option 2: Are you using Klocwork desktop tools (Plugins/kwcheck)? If yes, developer will be notified automatically about the new defects/issues that he has produced at his machine. So there may be no question of reviewing Klocwork portal by a developer just to see what are all the issues he has created.
Option 3: I see you have mentioned 90% of the code has been shared. Is that meant, your project needs windows dlls and Linux libraries together to build your project?.
If the Answer is YES, please do let me know. i will think about some possible workarounds.
If the Answer is NO, then creating kwtables is one time job and from second time onwards Klocwork can perform incremental analysis (kwbuildproject ....... --incremental)
Option 4: Creating multiple project is not a bad option. Existing project settings can be replicated and the issue status can be sync. When you push the results to Klocwork server, the results will be pushed from Build Machine to Klocwork web/database server and it creates /projects_root/My_Project/builds/My_Build_Name/ directory. So, maintaining two Klocwork projects wont make much of a difference.
Option 5: Schedule a call with Klocwork support team. They will be happy to assist you with the best possible way.
I hope this helps.

Windows Automation needs interaction with a .net application

I really don't know how to better explain this situation I'm running into but I'll try my best.
This is what I'm trying to do...
I currently have a batch file that does some set of actions such as downloading files from FTP, Folder creation, modifying some text files etc. This was taking us 45 minutes to do manually and with the batch script automation it's easier.
The next step I want to do is, launch our .net Windows application, login to it and do some actions in it and then log out of it. This is actually a regression test case which I've automated using VS Coded UI on another machine. The problem I'm running into is, there is a separate support team who will need to do that 45mins of job which I've already automated followed by some actions after logging into the application. That support team's machines will not have VS or Coded UI installed in it.
So, how do I go about it? Any idea, please?
You can execute the CodedUI tests you've written without Visual Studio/CodedUI being installed on the machines. Remember that you can run tests through controllers and agents in TFS or Microsoft Test Manager. You can take those principles to run them manually, even if it's a strange corner case. This takes two steps, if I recall correctly:
Design your CodedUI tests to reference the CodedUI .dlls as part of the solution, rather than the GAC. By this I mean copy and paste the required .dlls into a solution folder and replace the existing references with ones that point to the .dlls in the folder. When you distribute your tests, be sure to include this soln folder of course. (UPDATE: After some more experience wit this, I've found it much easier to use NuGet Packages instead. Project level references are an absolute NIGHTMARE)
Install the "Test Agent" software that Microsoft provides for free on the tester's machine. This will install the other testing .dlls your tester will probably need in their GAC. You could do step 1 with these as well but to be honest I think this is less trouble. In addition, it installs the necessary mstest executables.
Your testers will then have to use mstest.exe (UPDATE: Once you've installed agents, you can/should use vstest.console.exe as an alternative) in the console to run your CodedUI tests. Alternatively you canprobably use powershell or your batch files to execute your tests and your other tests in one neat package.
Please let me know if this gave you a potential solution for your problem.

ServiceStack.Examples Build FAIL all over the place on initial pull/clone from GitHub

this is EXTREMELY frustrating to anyone who just wants to pull down your code and check it out and get it to simple build successfully.
Here's the scoop.
So I open the ServiceStack.Examples-master\src\AppHarbor.sln after pulling it from github and cloning it to my local drive.
I have had nothing but trouble from the get go. I have had to fix this solution and project reference as well as assembly references.
there's nothing more irritating to a developer no matter if it's an internal solution or set of .NET projects or external, that bomb during initial build. This stuff should be building period.
Also when I can't even download an examples solution and get it to build it makes people wonder how well this open source API really is, can I truly even rely on it? This reflects on you Service Stack.
here's is what I did, nothing out of the norm here:
1) Cloned ServiceStack.Examples to my local c:\www\Sandbox folder where I keep stuff I'm playing around with
2) Just looking at the folder structure from the start, it makes no sense in terms of being discoverable and more importantly organized. For example why is there yet another ServiceStack.Examples inside src and then outside of that a ton of other example folders of other example apps in the root of \src also??? So you have stuff in src\ and in src\ServiceStack.Examples, this is hell confusing and disorganized.
ServiceStack.Examples\src\ServiceStack.Examples
3) Opened C:\www\Sandbox\ServiceStack.Examples\src\AppHarbor.sln
4) Tried to build all, and the first major problem is the MovieRest project doesn't load. I get an error while opening the .sln that it failed to load it:
ok fine, this is still ridiculous, nobody who downloads a solution should need to worry about fixin this but of course I did, so I readded it because in actuality this .csproj was moved into the src\ServiceStack.MovieRest\Web\ folder and looks to me like nobody even reopened the solution to fix it??
5) So then I go to try and build the solution again, notice all the missing binary references in MovieRest. So ultimately I figured ok, looks like pretty much every other project is getting their references from their associated packages folder however for some Reason MovieRest and the Nortwind projects don't have anything in their packages folder. so I end up manuall opening up the MovieRest VS 2012 solution and building it, and I guess Nuget must run or something during that build? Because now walla, I see the missing assemblies pop into ServiceStack.Examples\src\ServiceStack.MovieRest\packages finally.
6) Ok, so I rebuild again, and now it's complaining about missing sqllite assemblies and also a sqllite3.exe. So now I have to hunt around again to find them for the x84 and x64 and copy those missing assmblies back into ServiceStack.Examples\src\ServiceStack.MovieRest\Web\sqlite and I also noticed that MoviewRest project was referencing sqllite3.dll in the root of the project which was also missing...this is such a mess.
7) I notice that the Northwind project doesn't build either
I don't know what is going on here, I mean is the build really that messed up? Has to be.
Who is gonna fix this on the ServiceStack end? how the heck do I get this to finally build and how has this not been reported?
UPDATED 9/23
Here are the errors I get after pulling down the "fixed" solution. I did a Shift + Ctrl + B on it (Build All). Let me know if I am just missing something here but it's not building yet at least on my side:
UPDATE 10/1
Ok again lets talk about this.
I pulled this zip down: https://github.com/ServiceStack/ServiceStack/archive/v3-snapshot.zip from this page: https://github.com/ServiceStack/ServiceStack/releases
Opened the solution src\ServiceStack.sln (VS 2012 version)
First I get this SQL Express Error after opening it for the first time:
Now I try to build all on the solution and I get this build error:
So tell me what I could possibly doing wrong? This is a "Release" right? It should build right? It's not rocket science so how can people say this is a "dev consumer" issue? All I want is a stable release build. Simple.
I've just upgraded ServiceStack.Examples to VS 2013/IIS Express and updated it to the latest version of ServiceStack v3.9.63 that was just deployed. It should all build now, also some examples requires redis to be running on localhost.

Blackberry COD files randomly missing when using Eclipse 3.5

I'm finding the BB/Eclipse environment incredibly unstable and wanted to know if I'm doing something fundamentally wrong here?
I build my project and it produces about 40 or so COD files... usually. Sometimes if I clean and run some COD files are missing and it fails to run (or worse it runs the old version somehow). I kid you not, I'm spending about an hour each time I want to run/test my setup which is an order of magnitude slower than the other platforms I work with. It eventually works by hitting the clean/debug/clean/debug/etc... and doing nothing else except these clean/debug/repeat steps.
If I make incremental changes to my src it's fairly reliable at picking them up but when I add a new resource via windows explorer and say 'refresh' on that directory in eclipse it's when all the problems start.
Any pointers from experienced Eclipse/BB users would be much appreciated (especially how to narrow down why sometimes it works and sometimes it doesn't).
Thanks,
Stuart
I believe I've narrowed down the issues. Firstly I use DropBox on the src but this has the inadvertent feature of backing up build files and can't find a way of disabling this.
If the files are locked by Dropbox it unsurprisingly fails, the catch is it doesn't say 'couldn't write to file as it's locked' or anything helpful like that... just fails. Obviously when I go to inspect it Dropbox has done it's stuff so the perfect crime!
My learnings:
disable Dropbox on COD producing builds.
When changing SDK version I found I have to
change the SDK via the build config settings,
clean,
exit eclipse,
delete the build directory with windows explorer,
Restart eclipse and hit refresh/clean.
That seems to build fairly reliably now. Without restarting Eclipse I get all sorts of wierd errors of files going to wrong locations and dirty data being picked up. The main one is any //#ifdef's are not picked up by the preprocessor correctly so get 1001 errors.

Resources