tfs build craeting wrong AppManifest.xaml - msbuild

I created a automated build in tfs for the silverlight project. my project uses prism and so it has many xap created. but the AppManifest.xaml in the main xap file is wrong. it is using AppManifest.xaml of some other module(XAP file). Can anyone explain why this wil happen

This sounds like an MS BUILD configuration issue. Can you post your .proj file? I am guessing you have something configured incorrectly- that is the only way this would happen.

The probelm is, as the silverlight projects in the solution are building randomly, so it picks the manifest.xml of the project which is currently building and create a xap file.
So the solution is creating dependencies between sivelright projects. so that it will build in a certain order and there will not be any confusion of manifest

Related

Why is MSBuild.exe skipping important files

Short introduction
My goal is to get IIS 8 to run an asp.net 4.5 website. Currently I have a CI server that pulls from version control and builds the web application with MSBuild.exe with this line of code
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe C:\project\WebApplication\WebApplication.csproj /T:Package
The problem
The problem I am facing is that I dont understand why things like Controllers, Viewmodels, Models etc. that are pure C# code are being ignored or skipped when the project is being built with MSBuild.exe and packaged.
The package that MSBuild.exe returns only contains
Areas
bin
Content
fonts
Scripts
Views
and is missing many folders including
Controllers
Models
etc.
Questions
Is this normal?
Why does this happen?
What am I doing wrong?
Seems to be
No idea, but the functionality of the cs files is now probably part of dll's in the bin folder.
I was not doing anything wrong. I just thought this was a problem. I managed to get the asp.net web application to work on the web server like it does on the developer machine.

TeamCity can't find the <something>.fakes.dll

I'm setting up a CI with TeamCity 8 (v8.1.4).
I finally managed to setup TFS integration - ie checkout from TFS.
I used the super easy Auto Detect Build Steps [thank you JetBrains for that] to determine the Build Steps necessary.
I used the Get missing NuGet packages step, which works as expected.
Then I have a Visual Studio Solution build step, that seems to build great, just until the point where it wants to build the Unit Test and Integration Test projects, which both use Microsoft Fakes.
Here I can see that TeamCity tries to search everywhere for the [AssemblyNameUnderTest].Fakes.dll - where [AssemblyNameUnderTest] is whatever dll that is tested.
I haven't included that dll to my project nor in TFS, since I thought that it would be regenerated each and every time I change something to the original AssemblyNameUnderTest (ClassLibrary) Project.
Should I include the [AssemblyNameUnderTest].Fakes.dlls to the project and TFS or am I right that they are regenerated ?
And if I'm right with the regeneration, then why TeamCity can't find it ?
Thanks in advance,
Michael
Ah, so I found the answer to one of my questions: http://hamidshahid.blogspot.be/2012/11/microsoft-fakes-framework.html
The files in the "Fakes" folder are only generated at the time of
adding the fakes assembly. They are added to the solution and should
be checked into source control.
The "FakesAssemblies" folder and all the files in it are generated
whenever the project is compiled. This is important because if you are
adding fakes for assembly for a changing component, the generation of
FakesAssemblies will ensure that all changes are reflected in the
generated assembly.
So I did that - ie it is the default behaviour.
Above that my .fakes files have the "Fakes" build action, but it still isn't working for TeamCity.
Also, TeamCity uses the MSBuild.EXE from "C:\Program Files (x86)\MSBuild\12.0\Bin" for the build.
Anyone a bright idea ?
To fix the build, I removed the Fakes stuff and implemented Moq mocks.
Seems to give you more control of what exactly happens.

MSBuild: (WebDeploy) Web package creation for selected web projects

I managed to get TFS 2010 to create Web Deployment ZIPs (WebDeploy).
Now the issue is that I have multiple Web projects in the solution and packages are being created for all web projects.
In the projects that I do not want a package, I uncheck the "Create deployment package as a zip". I thought this will prevent MSBuild from creating a deployment package.
BTW I am passing "/p:DeployOnBuild=true" to MSBuild.
Is there a way to get MSBuild only package selected projects and not all Web projects?
Thanks.
Ok. Found the solution. Many thanks to Vishal Joshi for this post.
Extract from the post:
"
Deployment for Web Apps is feasible at both Solution as well as Project build level although when it comes to Solution Build then you might want to make sure that the properties you are passing at Solution level will apply to all the projects in the solution which might not always the outcome you desire. In that situation all these properties can be set within the .csproj or .vbproj files too. You can do that by unloading your project file and in the top <PropertyGroup> section just add above properties as you like:
For e.g /p:DeployOnBuild=True can be added as <DeployOnBuild>True</DeployOnBuild>
"
So, the solution was to remove /p:DeployOnBuild=true from TFS Build process template and update only the project files that require a package.

Web site to dll

I need to compile my web site, is it possible without converting to a web project first?
I think he wants to "protect" his code for any deployment.
If this is a .Net project you can try hide some code using codebehind components in ASP.NET.
Here is an small tutorial about it:
http://asp.net-tutorials.com/basics/code-behind/
For older projects you may have to build a cgi binary application, but as already mentioned here, add some more details to specify your problem.
I think you want a VS Web Deployment project. This exists as a separate project in your solution but can compile and copy the existing web project to a different directory.
There's a reasonable write-up of it on this blog with step-by-step instructions. You'll need to download and install the new project type separately though (2008, 2010)

aspnet_compiler and msbuild.exe

I am pretty new to msbuild and aspnet_compiler.
I am using aspnet_compiler to compile web application project. Now I just saw the MSBuild.exe and noticed that its builds my website into the /mywebsite/precompiledWeb folder. Now why do I need to use MSBuild.exe? Can't I directly use the aspnet_compiler to see if my website can be built properly?
(Not sure if I explained it very well).
msbuild.exe is usually used to build projects and its dependencies. When you have a web application project with a project file, vs can use this to build not only your web project but all the dependencies involved. This would only build your source code files, not the markup files (.aspx,.ascx,.etc).
aspnet_compiler is meant to build a web site project that doesn't have a project file. This said, you can also use it to make sure your markup files are also built for your web application project.
You are correct you can manually invoke the aspnet_compiler.exe tool. But better would be to use Web Deployment Projects to help you do this.