Using MSDeploy parameters to set the "additional provider settings" in a Web Deploy package - msdeploy

UPDATE: see Microsoft's official response below. I imagine there is a non-offical hack to accomplish this, so I'm leaving the question up.
UPDATE 2: Vote up my WebDeploy feature request to Microsoft on this issue.
I use MSDeploy heavily at my shop, and have spent hours trying to define an msdeploy parameter that will modify an "additional provider setting" for a deployment provider at deploy time. I came up empty on this when searching online and with Reflector on the Web Deploy binaries.
Specifically, I'm trying to allow command line options to manipulate the "DropObjectsNotInSource" and "BlockWhenDriftDetected" settings for DacDeployOptions of the dbDacFx provider.
I've tried every XPath expression I can think of to modify the DACFx options like these from a manifest.xml file:
<sitemanifest>
<dbDacFx path="C:\Database.dacpac"
DropObjectsNotInSource="False"
BlockOnPossibleDataLoss="True" />
</sitemanifest>
Using the msdeploy setParam with the kind DeploymentObjectAttribute always fails to find any matching nodes on //#DropObjectsNotInSource.
I suspect it fails because the value of DropObjectsNotInSource is actually stored in the attribute "MSDeploy.MSDeployProviderOptions" for the provider's node within the package's archive.xml file. (This attribute value seems to be a .Net serialized instance of the Microsoft.Web.Deployment.DeploymentProviderOptions, so it would be quite difficult to manipulate it with plain old XPath.)
Is it possible to modify these additional provider settings at deploy time?
UPDATE: I sent an email to the Microsoft Web Deploy team via their blog as well as posting here. The Web Deploy team was awesome in getting a response to me (thanks Harsh and Ranjith!). Unfortunately, the official word is this is not supported.
From: Ranjith Mukkai Ramachandra ...#microsoft.com
Subject: RE: Can MSDeploy setParam modify "additional provider settings"?
Date: February 15, 2013 5:20:46 PM EST
To: Web Deployment Support
Hi Steve,
Sorry, this is currently not supported.
Thanks,
Ranjith

Related

The ability of the #CurrentIteration macro to accept a team is disabled (On Premise TFS)

TFS URL : http://tfs.{my-organization-name}.com:8080/tfs/
TFS : On Premise
Version : TFS 2018 Update 2
Query: I want to use #CurrentIteration('[Project]/Team') in TFS Query, which I want to run from REST APIs. e.g. #CurrentIteration(‘[MyProject]/MyTeam’) (I have always only one team associated with one project, not more than one)
Issue: In TFS query, I have defined #CurrentIteration to get iterations dynamically but, as per their protocols, this variable will only work from their Web Portal and not from REST APIs.
Resolution: If we add team name as a parameter in braces with #CurrentIteration then, that will work for REST APIs and Web Portal both. But now when I add team as parameter I am getting below error in TFS.
Error: The ability of the #CurrentIteration macro to accept a team is disabled.
(I did research on it and it looks like, this ability might be available only in Azure DevOps Server 2019 and later version. I am not sure about this. Need help here.)
Reference link1
Reference link2
Reference link3
Can anyone have any idea why i am getting this error? Where can i have option to enable this ability in my on premise TFS web portal?
As you mentioned, this feature will be avaiable only on TFS 2019.
See the official featuers timeline here:
Clarify query iteration schedules with the #CurrentIteration Team parameter: 2019

Reference docs for Azure Resource Templates

I am looking for reference docs for the Azure Resource Manager JSON templates. Does anyone know if there is reference material for these templates?
There is general reference for required parameters etc like at Create a template deployment.
I am basically looking for the full availability so I can correspond setup on the portal to the JSON template. Also availability of features with apiVersion releases. I remember there being a MSDN documentation for the changelog with api version releases but cannot find it now.
If you create a VM with the desired settings, extensions etc then you can view their json template via https://resources.azure.com/
This will give some visibility into the Classic* templates.
All of the ARM templates can be found on GitHub here: https://github.com/Azure/azure-resource-manager-schemas.
It includes preview templates and should provide all the information you're after to determine which features are present in which apiVersion release.
Microsoft has finally created what I was looking for 🎉: full documentation is now available at https://learn.microsoft.com/en-au/azure/templates/
After some digging I managed to get the following list of schemas:
http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json
http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json
http://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.Sql.json
http://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json
http://schema.management.azure.com/schemas/2014-02-26/microsoft.visualstudio.json
http://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.Cache.json
http://schema.management.azure.com/schemas/2014-04-01/Microsoft.BizTalkServices.json
http://schema.management.azure.com/schemas/2014-08-01/Microsoft.Scheduler.json
http://schema.management.azure.com/schemas/2014-04-01/SuccessBricks.ClearDB.json
http://schema.management.azure.com/schemas/2015-01-01/Microsoft.Resources.json
http://schema.management.azure.com/schemas/2015-01-01/Microsoft.Authorization.json
http://schema.management.azure.com/schemas/2014-10-01-preview/Microsoft.Authorization.json
This list notably excludes:
Microsoft.ClassicCompute
Microsoft.ClassicStorage
Microsoft.ClassicNetwork
So I guess we're left to figure stuff out from the templates on those
To my mind we can dig that way:
open the azure-resource-manager schemas
Look at the main form below:
If you open properties, you will find the format that we need to fill:
open parameters and look at the structure:
$ref: #/definitions/parameter invite us to look at the same documents in definitions.parameters where you will find some documentation (like value you can use etc):
finally, if you look to properties.resources, you will find a list of url like:
{ "$ref": "http://schema.management.azure.com/schemas/2015-07-01-preview/Microsoft.ServerManagement.json#/resourceDefinitions/node" }
{ "$ref": "http://schema.management.azure.com/schemas/2015-07-01-preview/Microsoft.ServerManagement.json#/resourceDefinitions/gateway" }
if you open one of these url, you will find the JSON format you are looking for (here is a part of the first one):
There is not much available...
Azure Resource Manager Template Language
https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/
And then you can look at the different json.schemas that I have managed to find
deploymentTemplate
http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json
visualstudio
http://schema.management.azure.com/schemas/2014-02-26/microsoft.visualstudio.json
Sql
http://schema.management.azure.com/schemas/2014-06-01/2014-04-01-preview/Microsoft.Sql.json
Web
http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json
deploymentParameters
http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json
If you use Visual Studio to edit the json-template file you get intellisense (sometimes) which help a bit. But the lack of documentation is really annoying...for example I have no clue if the schemas listed above are the most recent or not, and I have no idea where to find which one is the most resent.
Edit:
I came across the list of additions and changes to the Service Management APIs. Seems to be a bit outdated, 2015-01-01 is the current version and it's not there.
Edit2:
With the Iaas updates at Build 2015, there seems to also be a lot of Azure Quickstart Templates. At minimum, they have the particular cases I was looking for with storage accounts.

Problem with Team Build 2010 and web.config transformation

I'm struggling to get web.config transformations working with automated builds.
We have a reasonably large solution, containing one ASP.NET web application and eight class libraries. We have three developers working on the project and, up to now, each has "published" the solution to a local folder then used file copy to deploy to a test server. I'm trying to put an automated build/deploy solution in place using TFS 2010.
I created a build definition and added a call to msdeploy.exe in the build process template, to get the application deployed to the test server. So far, so good!
I then tried to implement web.config transforms and I just can't get them to work. If I build and publish locally on my PC, the "publish" folder has the correct, transformed web.config file.
Using team build, the transformation just does not happen, and I just have the base web.config file.
I tried adding a post-build step in the web application's project file, as others have suggested, similar to:
<target name="AfterBuild">
<TransformXml Source="Web.generic.config"
Transform="$(ProjectConfigTransformFileName)"
Destination="Web.Config" />
</target>
but this fails beacuse the source web.config file has an "applicationSettings" section. I get the error
Could not find schema information for the element 'applicationSettings'.
I've seen suggstions around adding arguments to the MSBuild task in the build definition like
/t:TransformWebConfig /p:Configuration=Debug
But this falls over when the class library projects are built, presumably because they don't have a web.config file.
Any ideas? Like others, I thought this would "just work", but apparently not. This is the last part I need to get working and it's driving me mad. I'm not an msbuild expert, so plain and simple please!
Thanks in advance.
Doug
I just went through this. Our build was a bit more complicated in that we have 8 class libraries and 9 web applications in one solution. But the flow is the same.
First off get rid of your after build target. You won't need that.
You need to use the MSDeployPublish service. This will require that it be installed and configured properly on the destination server. Check the following links for info on this part:
Note that the server in question MUST be configured properly with the correct user rights. The following sites helped me get that properly set up.
http://william.jerla.me/post/2010/03/20/Configuring-MSDeploy-in-IIS-7.aspx
http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html
How can I get TFS2010 to run MSDEPLOY for me through MSBUILD?
The next part requires that your build definition have the correct MSBuild parameters set up to do the publish. Those parameters are entered in the Process > 3.Advanced > MS Build Arguments line of the build definition. Here's a hint:
(don't change the following for any reason)
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=False
/p:MSDeployPublishMethod=WMSVC
/p:SkipExtraFilesOnServer=True
/p:AllowUntrustedCertificate=True
(These control where it's going)
/p:MSDeployServiceUrl="https://testserver.domain:8172/msdeploy.axd"
/p:UserName=testserver\buildaccount
/p:Password=buildacctpassword
/p:DeployIisAppPath="MyApp - TESTING"
Obviously the user will have to be configured in IIS on the target server to be allowed access to that axd (see previous links). And the IisAppPath is the name of the website on the target server.
You won't have to do anything special for the config transformations as the build itself will take care of that for you. Just have the correct setting in the line at Process > 1. Required > Items to Build > Configurations To Build.
Instead of trying to do the deploy by adding tasks myself into the build process template, I followed advice in Vishal Joshi's blog post here.
Now the entire project is built and deployed and the web.config transformations work also. Brilliant!
I now have another problem to solve! The web application references web services and the build process results in an XmlSerializers dll. However, although this is built OK, it does not get deployed to the web host. I think this needs a new post!
Doug

VSeWSS Administrator Privileges and <SafeControl> entry

I am trying to deploy my first custom aspx page in sharepoint:
Windows Server 2003
Microsoft Visual Studio 2008
VSeWSS 1.3
Latest Sharepoint Patches as of May 28, 2009
I am following this detailed howto:
http://geeksconnected.com/jamil/Lists/Posts/Post.aspx?ID=19
Unfortunately, it quickly becomes incomplete toward the bottom. I am running into two issues thus far:
How do you grant the VSeWSS Administrator privileges so that the "Deploy" option will work in Visual Studio?
It cuts off half of the <SafeControl> tag in the example, and I am not sure what to put after the PublicKeyToken= option. All current attempts completely break sharepoint.
Any solutions and explanations would be appreciated. Thanks in advance for any help.
Do yourself a favor and use WSPBuilder and its companion SPVisualDev instead of VSeWSS. Both of these tools are on CodePlex.com
They will take care of your safecontrols problem by adding that into the WSP file that any SharePoint administrator can install. (Frankly, modifying web.config by hand in a SharePoint environment is a big no-no in my mind, especially safecontrols)
They will also not need the elaborate 2-project spoof just to have a codebehind for an ASPX page that the article you quoted promotes. SPVisualDev will give you the option to do 'add new item' in visual studio and select a new Page or UserControl with codebehind, and take care of the deployment through WSP. Easy as!
Did you follow the instructions for post-install configuration of VSeWSS 1.3? http://blogs.msdn.com/steve_fox/archive/2009/03/18/vsewss-1-3-post-install-configuration.aspx
You probably need an account which is allowed to run stsadm.
2.The safe control tag should look like the following:
<SafeControl Assembly="[Assembly Name]" Namespace="[Namespace]" TypeName="*" Safe="True" />
To get the public key token you first have to sign the assembly (properties on the project->signing). Then you can build it and drop in the GAC (C:\Windows\assembly) and read the public key token directly in your explorer window.

How to Get attachments Associated with artifacts in SourceForge Enterprise Edition

We are using SourceForge Enterprise Edition 4.4 in one of our project.
My question is, in CollabNet SFEE (SourceForge Enterprise Edition 4.4), how will we get attachments associated with an Artifacts Using SFEE SOAP API?
We have made our own .net 2.0 client. We are not using .net SDK provided by Collabnet,
If you commit with a message you can add "[artf1000]" (where artf1000 is your artifact number) to the beginning or end of your commit message. Then it will associate to that artifact you can also do this with documents using doc1000, to get the id of the item you can use the URL it is what is after the http://sfeeserver/sf/go/.
Documents and artifacts are the only item I have used this for so I am not sure about other types of links, but I would imagine anything that has a /go/ID could be referenced by the ID.
ie:
http://sfeeserver/sf/go/artf1000
http://sfeeserver/sf/go/doc1000
Edited to add:
I have seemingly successfully tried this with releases, tasks, and discussions as well.
You can cheat a little bit and have a look at the scripts from SFEE. Log into your SFEE via SSH and take a look at the following script:
/usr/local/sourceforge/sourceforge_home/integration/post-commit.py
Maybe it helps...

Resources