How to build Windows Store 8.1 app without Visual Studio? - c#

I need this for the build server - I'd like to avoid installing full Visual Studio there.
I use the newest v12 MSBuild to build the solution with the app. Installing .NET Framework 4.5.1 and Windows 8.1 SDK got me through several compilation errors. With all that installed, right now, I get this:
error MSB4019: The imported project "C:\Program Files
(x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.CSharp.targets"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
The targets file is present on my development machine with Visual Studio 2013 installed, so I guess it got there with VS 2013. When I tried to paste the whole folder to the build machine (I know, a stupid thing to do), I got the following compilation warnings and errors:
warning MSB3644: The reference assemblies for framework
".NETCore,Version=v4.5.1" were not found. To resolve this, install the
SDK or Targeting Pack for this framework version or retarget your
application to a version of the framework for which you have the SDK
or Targeting Pack installed.
XamlCompiler error WMC1006: Cannot
resolve Assembly or Windows Metadata file 'System.Runtime.dll'
Xaml Internal Error error WMC9999: Type universe cannot resolve assembly:
System.Runtime, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.
Obviously, copying and pasting stuff around is not a way to go. Is there some proper approach to achieve what I want?
EDIT: The build machine has Windows Server 2012 installed, not Windows 8.1. Could that be a problem?
EDIT 2: After comparing outputs of msbuilds executed both on development machine and build server, I've noticed that the folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1 is missing from the build machine (there is only 4.5 folder). After pasting it, I got the following error:
CompileXaml error WMC9998: XBF generation failure due to missing
Windows 8.1 Support, Set property
<DisableXbfGeneration>true</DisableXbfGeneration> in your Project file
and try again.
There is still something missing from the Windows 8.1 toolchain...

Since it's a windows store app, and Windows Server 2012 doesn't have an app store, I'd say the libraries needed in order to compile the app are just missing from the OS itself. I suggest running tracer on a windows 8.1 box to see what files are accessed during compilation, and copy them to the server. I'm not certain that this will work, but it's the likeliest scenario I can think of. You can use something like Process Monitor for this
See what files/registry keys are being accessed by application in Windows
Alternatively, you might want to monitor the temporary build folder in .net to see what assemblies get copied locally during the build.
EDIT: Microsoft doesn't officially support this http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx

Did you download and install Microsoft Build Tools 2013 on the build server? The v12 version of MsBuild is now released as part of Visual Studio (instead of the Microsoft.NET Framework) and you'd want to use this separate install to get the MsBuild v12 bits on your build server.

I just did this a few weeks ago for a Windows 8 store app so it should be the same for Windows 8.1. As long as the build machine is running Windows 8.1, All you should need to do is install the latest Visual Studio Express for Windows Store Apps on the build machine and you should be fine. It should install everything you need.

Related

unable to install or run C# application on client PC

I have developed a desktop application in c# & SQL server 2012 using Visual Studio 2013. I have included the reference for Microsoft.VisualStudio.DebuggerVisualizers and set copy local : true.
The application runs perfectly on client systems with windows 8, 10.
But its showing this error while installing on a windows 7 system.
- OS Windows 7 Ultimate
- already installed .NET Framework 4.5
- installed Report Viewer.exe 2012
- installed report viewer.msi 2010
- installed sqlclr types
- the system doesnt have any microsoft c++ redistributable , i am not sure whether it has any impact.
I checked in the assembly folder, but couldnt find the Microsoft.VisualStudio.DebuggerVisualizers.dll
Am I missing any prerequisites here? How to solve this issue so that i can install the application
Error Message
It needs the Microsoft.VisualStudio.DebuggerVisualizers.dll in the global assembly cache. The GAC is the area where libs are placed which can be accessed from all of the system.
It's kinda a ugly fix but you could place this lib in the same or subdirectory of the same directory where the application is.
Is it possibly that you haven't installed VS on that Win7 machine but on the others?
Unintentionally the Microsoft.VisualStudio.DebuggerVisualizers.dll had been included in the project reference. And in the client system the specified dll could not be found even after trying to install it. Hence I removed it from reference and then it worked perfectly fine without any issues. I guess instead of report visualizer i have included debuggervisualizer. It was a manual error.
Thank you for your support

How to properly resolve Can't find PInvoke DLL 'sqlceme35.dll'

Disclaimer: I am a total noob when it comes to anything .Net, but I have to get stuck in for a project I'm working on.
I see there are already some posts on this here, but no complete answer on how to resolve this. I get this warning:
Can't find PInvoke DLL 'sqlceme35.dll'
when trying to deploy to a Windows Mobile 6.5.3 emulator from Visual Studio (I'm coding in C#). I am obviously using Sql Server CE for the application. I see it deploys just fine to emulators running older versions of Windows Mobile (namely 5.0).
Could anybody please explain this?
sqlceme35.dll is not part of a standard Windows Mobile SDK installation and needs to be installed separately (see https://www.microsoft.com/en-us/download/details.aspx?id=8831) and deployed manually (copy and install CAB file from your PC after install, see https://msdn.microsoft.com/en-us/library/13kw2t64%28v=vs.90%29.aspx).
In your case you need to install the cab files from the wce500 subdirectory. ( "drive:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce400 or wce500\CPU architecture type").
Although the site https://technet.microsoft.com/en-us/library/ms172361%28v=sql.105%29.aspx states that SQL Server CE runtimes will be deployed automatically, this is not always the case. So best is to manually install the runtimes before running an app that depends on them.
C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i
Get the following cab files:
sqlce.wce5.armv4i.CAB
sqlce.repl.ppc.wce5.armv4i.CAB
sqlce.ppc.wce5.armv4i.CAB
sqlce.dev.ENU.wce5.armv4i.CAB
Install those onto the Program files directory of your pocket pc. Once they are installed, you will then see a folder called "Microsoft SQL Server Compact Edition". It will have the dlls that your application uses.

UWP (Windows 10 APP) - appcert.exe crashes before my app get tested

I've developed an simple and small Universal Windows App that uses EF7 and SQLite. The app builds normally and it runs perfectly from Visual Studio. I also can run it directly from Windows 10 in the start menu after the I side loaded it (once the app package is generated).
My problem is that I can't test the app after it's package is generated because of an error on appcert.exe.
If I generate app package to x86 when launching windows app certification from visual studio right after the package is generated I get the error "the appxbundle could not be implanted" even before the test starts.
If I generate app package to x64 when launching windows app certification from visual studio right after the package is generated the test starts normally but before it's done I get the following error: "an unhandled microsoft .netframework exception occurred in appcertui.exe".
The appcert.exe crashes and does not tell me why.
I've searched in google and I've looked at windows log event but found nothing helpful.
I just don't know what to do. My app is finished, I can generate it´s package but I can´t generate the ".appxupload" because of this error I mentioned.
Can someone help me?
The file C:\Program Files (x86)\Windows Kits\10\App Certification Kit\binaryinfo.dll is CLSID {3866CD68-0FC3-4563-8888-E107295BC485} on my machine.
I was able to reproduce your crash by unregistering binaryinfo.dll on my machine and clicking "Validate Store App".
Maybe a fix for your issue to do register this dll (maybe all of them?).
From an administrator/elevated command prompt
regsvr32 "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\binaryinfo.dll"
How your machine got into this state...unknown.
I've made a fresh install of Windows 10 and its SDK in a virtual machine on Virtual Box. The appcertui.exe is running fine and my app was tested successfully.
It might be a problem in the installation of the .NET Framework since I updated from Windows 7 to Windows 10.
I will try to completely reinstall both .NET Framework and the SDK to solve this issue. If none of this works I will reinstall Windows 10 from scratch on my computer.

Could not load Microsoft.Build.dll in Windows Phone 8 SDK and VS 2012

I have installed the Windows Phone SDK 8.0 and Visual Studio 2012 Premium with Update 1. When I create now a new phone project I get three errors:
Error 1 The "CompileXaml" task could not be instantiated from
"C:\Program Files
(x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Silverlight.WindowsPhone.Build.Tasks.dll".
Could not load file or assembly 'Microsoft.Build.dll' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.
Error 2 The "CompileXaml" task has been declared or used incorrectly,
or failed during construction. Check the spelling of the task name and
the assembly name.
Error 3 The name "LocalizedStrings" does not exist in the namespace
"clr-namespace:PhoneApp24". C:\PhoneDevelopment\PhoneApp24\PhoneApp24\App.xaml
While googling I found some guys out there who have similar errors while using Windows 8 in a virtual machine. But in my case I have installed everything on my laptop. I have also already uninstalled VS2012 and the SDK. But after the reinstallation I still get the same exceptions.
Can someone please give me some hints?
This happened to me as well after trying to create a project using a VMWare shared folder for the file. Try creating the project in a local directory if you are using a VM then the project will build fine. Apparently the assembly files are either not downloaded properly or do not have permission to be read. More than likely it's the namespace itself causing the issue.
Error 1 Could not load the assembly file://\vmware-host\shared folders\Documents\Visual Studio 2012\Projects\NewApp.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.
Try running VS2012 as administrator.
After spending hours trying to get the sdk working I finally did a window recovery. Since windows 8 this is now a very quick process. Just insert the windows cd and run the setup again. If you choose the right option you can reinstall windows 8 without loosing your data. After 10 minutes your system reboots and you have to fill in again some data.
After that I installed the SDK. No error poped out and everything went very smoothly. Then I started VS express, created a project and built it successfully!
After the SDK installation I found two additional tiles on my desktop: "Hyper-V Manager" and "Hyper-V Virtual Machine...". I am pretty sure that those two tiles were not when I installed the SDK before. So I guess that I have had some problems with my virtual machine and that this was probably the source of the building exceptions.
I had this trying to run one of the Office 365 API samples and it turned out to be a missing file in the solution. Specifically, the solution was expecting a temp PFX certificate at the root of the project. I removed that and the build errors stopped.

i need to create a .net 4.0 deployment setup in french language

I am working in .net 4.0, I need to create deployment setup in visual studio 2012 with all prerequisites like .netframework 4.0,sqlite etc.
when i create the setup in english (default), it is working good, means it is installing all the things properly on client machine.
But when i change the default language to french, it give an error
1: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX40\dotNetFx40LP_Full_x86_x64fr.exe' in item 'Microsoft .NET Framework 4 (x86 and x64)' can not be located on disk. See Help for more information.
2: General failure building bootstrapper
3: Unrecoverable build error
Please help me, how can i remove this error.
Another thing is that when i change the settings for prerequisites like "download the prerequisites from the vendor's website", then it does not give an error.
But i need to install from local disk/folder including in setup folder.
It is necessary to place the file into the proper language directory.
Here, you're missing the \fr part in your path.
So you must place the file dotNetFx40LP_Full_x86_x64fr.exe to directory c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\fr for 64 bit windows or to c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\fr for 32 bit windows.

Categories