How do I get TFS 2010 Builds to use new build configuration and transform web config [closed] - web-config

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have a situation where I am using TFS builds to deploy an MVC site to various environments. I would like to use the web.config transforms with the TFS builds to ensure things like connection strings are correct for each environment without me having to edit the web config manually.
I have created new Configurations (using the Configuration Manager in VS2010) for Dev, QA and RC. I also have Web.Dev.config etc with appropriate transformations but am at a loss to get these working with the TFS build definitions I have created.
Any ideas??
EDIT: Schoolboy error on my part (no offence intended to schoolboys, most would know better!) I didn't check in my solution file and so TFS had no idea I had created new build configurations.

The TFS Build server will select the correct transformation based on the type of build you are running. So, you should just need to pick the build type.
To do this:
Go edit your build definition
On the Process "tab", expand 1.Required and "Items To Build"
Click the ellipses on "Configurations to Build"
Click Add and type in the particular configuration you want in the Configuration line. Note that this is a drop down list that does allow you to type into it; the configuration type must match exactly to the named config you have for the transformation. In your case, if the configuration is named "Dev" then just type in "Dev".
Pick the platform. Usually this is "Any CPU". However, sometimes you might need to explicitly set it to x86 if you have 32 bit assembly dependencies.

Related

runMain Boot project configuration [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I am trying to compile my scala project with my configuration, but it do not see the akka. I think it is because of my working directory, which is exactly to Boot.scala file, including all packages. I tried to put my working directory to its file but in this case I got ClassNotFoundException: Boot.
Can someone can help me please.
If someone will find it useful, the problem was that I did not give correct path to my Boot.scala file. So, in order to work I make following, in Tasks field of Run/Debug configuration, it is necessary to write full path to Boot.scala file. For instance, "runMain com.company.activity.service.Boot" (the quotes are necessary). Uncheck the using sbt shell and fill Working directory and Environment variables fields. After that press Apply button and your project should compile well.

What is the purpose of having two run configurations suh as 'Debug' and 'Release'?

I have just started using Eclipse CDT and would like to know why there are two run configurations such as Debug and Release.
Could I use this this to improve my workflow in any way? The manuals for CDT just mention that there are two default configurations, but never mention why.
Thank you for your answers.
Not specifically to Eclipse, but for all software and web development you'll encounter these two configurations.
You use Debug to test your application. You will probably generate debug symbols to step through your code, and it will probably avoid some optimizations. The purpose is to facilitate diagnosing issues.
Then, Release configuration is the one you want to use to publish or deploy your application. It could apply optimizations.
Also, if you make want to connect to different servers, or name files differently, or even execute different path codes depending if you are testing locally or if the final user is executing what you made.
Another example is Logging and Tracing, in Debug mode you may want to enable things to print to console or write to a file/log. But in Release you'll want to avoid them if it reduces the performance

How to use Jenkins Multi-Configuration (Matrix) type Projects?

Jenkins official Wiki page for Matrix projects isn't really helping me; so I have a few questions.
We're trying to build a couple of projects that are all essentially the same, just some are being branded differently for our customers. In other words, the software / tests / etc. are all identical, except for some tweaks to turn BrandA into BrandB (or BrandC, etc.)
I figure I should be using a Matrix project to create builds for BrandA, BrandB, etc. While I haven't figured out all my steps yet (including how to rename executables after they're built) I know that I will need to pass the Brand Name to many of my Jenkins Powershell scripts during the build process, and then use that brand n the script.
How do I get these variables into my scripts? Are they automatically passed in to every build step in Jenkins? What is the variable name to use?
Finally, is there a good resource on building these multi-configuration projects in Jenkins? I can't seem to find anything comprehensive online.
If you usually build the job for BrandA and only occasionally for BrandB and BrandC a matrix project may not be what you want. I recommend, instead, using a parameterized job where the brand is a parameter whose default value is BrandA. If the parameter is named BRAND the parameter is accessible in all of the builds and publish steps with ${BRAND} and as an environment variable as %BRAND%.
I refer you to the parameterized build wiki for more details.
Yes, ${BRAND} and %BRAND% should work fine.
If you're using Maven, ${env.BRAND} does this too.
There's a plugin that you can see all Environment Variables that are available to your job/build.
https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin
I'm not aware of that kind of process but I suggest you tu use the Copy project functionnality.
New Job
Copy From existing job
You will have a copy of your Job and you'll be able to setup easily all specific fields.

CRM2011 Plugin tool not allowing update of existing DLL [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am currently having a problem where when I try to update an existing DLL, if I update it with the location of Database then I have the following error being returned:
Error Code: 2147204725
Message: Plug-in assembly does not contain the required types or assembly content cannot be updated
However if I try to use the disk location option then I have a different error message:
Error Code: 2147220906
Message: Assembly must be registered in isolation.
Yet I do not understand why this is. Currently I have tried the following:
Making sure I am a Deployment Manager (I am not deploying to a Sandbox, as I am trying to update the existing one that is on the server.)
A colleague who is able to update the plugin has sent me the DLL which he has checked works, to ensure that it is not the DLL that is the problem
I have tried using the plugin tool on the colleagues computer, to ensure that the version is not the problem - but it still does not work for me.
The colleague has tried to use the plugin tool on my machine. However when they do then they get the same errors as I do (although on their machine it works just fine for them but not myself)
Does anyone have any suggestions on what could be my problem and why I can't seem to update a plugin on my machine?
Thanks
The error 2147204725 you are getting, could occur when the class name in your plugin is changed.
Your plugin may be registered the first time with a class named PluginClassName1, for example, and then registered (updated) a second time, after the class PluginClassName1 is changed to PluginClassName2. In this case, the plugin type, which is the plugin class implementing IPlugin, is not retrieved in the already registered assembly.
Other causes could be changing the original assembly metadata (Culture, PublicKeyToken, Name, Version) or the signature key.
To solve the resulting issue, you should unregister the assembly and then re-register it again and also re-add the related steps/images.

How do you deploy a website and database project using TFS 2010?

I've been trying to figure this out and so far haven't found a simple solution. Is it really that hard to deploy a database project (and a web site) using TFS 2010 as part of the build process?
I've found one example that involved lots of complicated checks and editing the workflow (which is a giant workflow btw).
I've even purchased the book "professional application lifecycle management with VS 2010", but apparently professionals don't deploy their applications since it isn't even mentioned in the book.
I know I'm retarded when it comes to TFS, but it seems like there should be any easy way to do this. Is there?
I can't speak for the database portion, but I just went through this on the web portion, the magic part is not very well documented component, namely the MSBuild Parameters.
In your build definition:
Process on the Left
Required > Items to Build > Configurations to Build
Edit, add a new one, for this example
Configuration: Dev (I cover how to create a configuration below)
Platform: Any CPU
Advanced > MSBuild Process
Use the following arguments (at least for me, your publish method may vary).
MsBuild Params:
/p:MSDeployServiceURL="http://myserver"
/p:MSDeployPublishMethod=RemoteAgent
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:username=aduser
/p:password=adpassword
Requirements:
You need to install the MS Deploy Remote Agent Service on the destination web server, MSDeploy needs to be on the Build/Deployer server as well, but this should be the case by default.
The account you use in the params above needs admin access, at least to IIS...I'm not sure what the minimum permission requirements are.
You configure which WebSite/Virtual Directory the site goes to in the Web project you're deploying. Personally I have a build configuration for each environment, this makes the builds very easy to handle and organize. For example we have Release, Debug and Dev (there are more but for this example that's it). Only the Web project has a Dev configuration.
To do this, right click the solution, Configuration Manager..., On the web project click the configuration drop down, click New.... Give it a name, "Dev" for this example, copy settings from debug or release, whatever matches closest to what your deployment server environment should be. Make sure "Create new solution configurations" is checked, it is by default. After creating this, change the configuration dropdown on the solution to the new Dev one, and Any CPU...make sure your projects are all correct, I had some flipping to x86 and x64 randomly, not sure of the exact cause of that).
In your web project, right click, properties. On the left, click Package/Publish Web (you'll also want to mess with the other Package/Publish SQL tab, but I can't speak to that). In the options on the right click Create deployment package as a zip file. The default location is fine, the next textbox I didn't find documented anywhere. The format is this: WebSite/Virtual Directory, so if you have a site called "BuildSite" in IIS with no virtual directory (app == site root), you would have BuildSite only in this box. If it was in a virtual directory, you might have Default Web Site/BuildVirtualDirectory.
After you set all that, make sure to check-in the solution and web project so the build server has the configuration changes you made, then kick off a build :)
If you have more questions, I recommend you watch this video by Vishal Joshi, specifically around 22 and 59 minutes in, he covers the database portion as well...but I have no actual experience trying it since we're on top of a non MSSQL database.