I wrote a custom Managed Bootstrapper Application (MBA) and got most of the functionality to work, except for a repair. Examining the bundle log provides:
[335C:3440][2013-04-29T13:51:41]w343: Prompt for source of package:
NetFx45Web, payload: NetFx45Web, path:
D:\dev\Setup\redist\dotNetFx45_Full_setup.exe
[335C:3440][2013-04-29T13:51:41]e054: Failed to resolve source for file:
D:\dev\Setup\redist\dotNetFx45_Full_setup.exe, error: 0x80070002.
[335C:3440][2013-04-29T13:51:41]e000: Error 0x80070002: Failed while
prompting for source (original path
'D:\dev\Setup\redist\dotNetFx45_Full_setup.exe').
[335C:3440][2013-04-29T13:51:41]e313: Failed to acquire payload: NetFx45Web
to working path:
C:\Users\admin\AppData\Local\Temp\{ab28ebc1-ce07-49bf-bb1f-bb83a4944aeb}\NetFx45Web,
error: 0x80070002.
[335C:164C][2013-04-29T13:51:41]e000: Error 0x80070002: Failed while
caching, aborting execution.
[335C:164C][2013-04-29T13:51:41]i399: Apply complete, result: 0x80070002,
restart: None, ba requested restart: No
[335C:164C][2013-04-29T13:51:43]i500: Shutting down, exit code: 0x80070002
[335C:164C][2013-04-29T13:51:43]i410: Variable: ArpSystemComponentCustom = 1
[335C:164C][2013-04-29T13:51:43]i410: Variable: NETFRAMEWORK45 = 378389
Interestingly, even though the master log file populates the package specific log file variable name, Burn does not actually generate that file. My guess is it fails before it can do so.
I have included the NetFx45Web package in my WiX bundle as:
<PackageGroupRef Id="NetFx45Web"/>
My BootstrapperCore.config is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="wix.bootstrapper"
type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup,
BootstrapperCore">
<section name="host"
type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection,
BootstrapperCore" />
</sectionGroup>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<wix.bootstrapper>
<host assemblyName="MyCustomMBA">
<supportedFramework version="v4\Full"/>
<supportedFramework version="v4\Client"/>
</host>
</wix.bootstrapper></configuration>
I have looked at related mailing list threads:
Burn - multiple PackageGroupRef in Chain - download issues
.NET 4 pre-req in WixNetFxExtension
And I have the ResolveSource matter as discussed there, covered.
Why may this be failing on a repair? The install/uninstall works perfectly fine.
The error 0x80070002 means the file cannot be located. It also does not appear from the log file that the ResolveSource() callback returned Result.Download to instruct the Burn engine to attempt to reacquire the .NET Framework from the Internet. If the bootstrapper application (BA) returns Result.Download, you'll see log entries that talk about acquiring the NETFX4.5 payload from some URL.
Related
I can't find anything to resolve this and have tried multiple things.
Task: I am trying to add bundles to an old existing web project. I have added everything I need I believe as I have done the same in a new project and it works.
<webopt:BundleReference runat="server" Path="~/bundles/masterstyle" />
This seems to be where the issue has started with this line above. I installed via nuget the web optimization webforms package which fixed the squiggly line under webopt. However, now, I am getting 2 issues.
BundleReference has a squiggly line saying "Element
'BundleReference' is not a known element/ This can occur if there is
a complication error in the Web site, or the web.config file is
missing".
It also can't seem to find the package I have just installed which
is "Could not load file or assembly
'Microsoft.AspNet.Web.Optimization.WebForms' or one of its
dependencies. The system cannot find the file specified".
If anyone can help resolve this, it would be greatly appreciated. Been stuck on it for 4 hours now.
Here is the likely relevant stuff in my web.config file:
<pages>
<namespaces>
<add namespace="System.Web.Optimization"/>
</namespaces>
<tagMapping>
<add tagType="System.Web.UI.HtmlControls.HtmlForm" mappedTagType="we3.Site.Form" />
</tagMapping>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
</controls>
</pages>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
Install it from nugget: https://www.nuget.org/packages/Microsoft.AspNet.Web.Optimization.WebForms/
Install-Package Microsoft.AspNet.Web.Optimization.WebForms
Or you can manually download it from: https://www.nuget.org/api/v2/package/Microsoft.AspNet.Web.Optimization.WebForms/1.1.3
and add it as reference to your project (unzip first the .nupkg file)
Installing the package Microsoft.AspNet.Web.Optimization is what resolved this for me.
Install-Package Microsoft.AspNet.Web.Optimization
I have got a project with two web apps. One of them is only for reference in the base app. The project runs okay in visual studio. I am trying to publish it in local file system and then copy it across to the windows server 2008. Below is the web.config generated by visual studio.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="bootstrapper-version" value="1.0.0-beta4" />
<add key="runtime-path" value="..\approot\packages" />
<add key="dnx-version" value="1.0.0-beta4" />
<add key="dnx-clr" value="clr" />
<add key="dnx-app-base" value="..\approot\src\MySite" />
</appSettings>
</configuration>
When I run this website in Server using dnx . web, it runs okay. But when I try to run it under IIS by pointing IIS to wwwroot then all of the packages go missing. The website is unable to find packages.
Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
Base32 1.0.0.13
BouncyCastle 1.7.0
CsQuery 1.3.4
EcmaScript.Net 1.0.1.0
EntityFramework 7.0.0-beta4
EntityFramework.Commands 7.0.0-beta4
EntityFramework.Core 7.0.0-beta4
EntityFramework.Relational 7.0.0-beta4
EntityFramework.Relational.Design 7.0.0-beta4
EntityFramework.SqlServer 7.0.0-beta4
EntityFramework.SqlServer.Design 7.0.0-beta4
.........
.........
How did you deploy?
Here are the steps that you can follow to get that running:
Make sure that you the app pool is a .NET 4 app pool
Run, in your web app's project folder dnu publish --runtime <name of runtime> (the name is the name of the runtime folder under %userprofile%\.dnx\runtimes
Step 2 generates a folder that contains the application, its dependencies and the runtime under the bin\debug folder.
Copy that folder to the IIS website folder
Run
I'm pretty new to build servers but have been asked by my employer to do some testing (because F5 is not a build process, as the excellent article by Jeff Atwood says). At this stage, I'm working on getting some sample builds and test reports up and running on a CruiseControl.NET server. So far, I've gotten a build up and running (the configuration file will need some tidying up before adding new builds/projects but the proof of concept is there) but the reporting is causing something of a headache.
The main report I'm looking for is for out NUnit tests and SpecFlow integration tests. The tests run fine (as I'm getting a sensible looking xml file generated) and am looking to merge that in to the main build results so that I can show the results of the NUnit/SpecFlowtests.
Whenever the build completes, the following is reported in the messages (in ViewFarmReport.aspx): "Failing Tasks : XmlLogPublisher "
This combined with the following error reported in the Windows application log (source - CC.Net)
2015-03-24 08:36:52,987 [Initech.SuperCrm-DEV] ERROR CruiseControl.NET [(null)] - Publisher threw exception: ThoughtWorks.CruiseControl.Core.CruiseControlException: Unable to read the contents of the file: C:\CCNet\BuildArtifacts\Initech.SuperCrm-DEV\msbuild-results-7c657954-2c3e-405f-b0f1-7da1299788fd.xml ---> System.IO.FileNotFoundException: Could not find file 'C:\CCNet\BuildArtifacts\Initech.SuperCrm-DEV\msbuild-results-7c657954-2c3e-405f-b0f1-7da1299788fd.xml'.
(company/application name "censored")
This leads me to suspect that the failure to merge in the msbuild results (which I believe CruiseControl.NET automatically scrapes since version... 1.5 or 1.6?) is preventing the NUnit results from being merged in.
There is no msbuild-results file in the BuildArtifacts folder, which does not surprise me as I do not believe my current msbuild configuration allows for xml based logging as I am using the ThoughtWorks.CruiseControl.MsBuild.dll logger.
According to the online documentation for CruiseControl.NET there is XML enabled custom logger: ThoughtWorks.CruiseControl.MsBuild.XmlLogger which can be used, however the download location for this logger: here
appears not to exist any more.
Can anyone say whether I'm thinking along the right lines here and what my options are?
For reference, here is my complete configuration:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<cb:define MSBuildPath="C:\Windows\Microsoft.NET\Framework\v4.0.30319" />
<cb:define WorkingBaseDir="C:\CCNet\Builds" />
<cb:define ArtifactBaseDir="C:\CCNet\BuildArtifacts" />
<cb:define MSBuildLogger="C:\Program Files (x86)\CruiseControl.NET\server
\ThoughtWorks.CruiseControl.MsBuild.dll" />
<cb:define NUnitExe="C:\Jenkins\Nunit\nunit-console.exe" />
<cb:define name="vsts_ci">
<executable>C:\Jenkins\tf.exe</executable>
<server>http://tfs-srv:8080/tfs/LEEDS/</server>
<domain>CONTOSO</domain>
<autoGetSource>true</autoGetSource>
<cleanCopy>true</cleanCopy>
<force>true</force>
<deleteWorkspace>true</deleteWorkspace>
</cb:define>
<project name="Initech.Libraries" description="Shared libraries used in all Initech projects"
queue="Q1">
<state type="state" directory="C:\CCNet\State"/>
<artifactDirectory>$(ArtifactBaseDir)\Initech.Libraries</artifactDirectory>
<workingDirectory>$(WorkingBaseDir)\Initech.Libraries</workingDirectory>
<triggers>
<intervalTrigger
name="continuous"
seconds="30"
buildCondition="IfModificationExists"
initialSeconds="5"/>
</triggers>
<sourcecontrol type="vsts">
<cb:vsts_ci/>
<workspace>CCNET_Initech.Libraries</workspace>
<project>$/InitechLibraries/Initech.Libraries</project>
</sourcecontrol>
</project>
<project name="Initech.SuperCrm-DEV" description="Initech.SuperCrm Application, Development
Version" queue="Q1">
<cb:define ArtifactDirectory="$(ArtifactBaseDir)\Initech.SuperCrm-DEV" />
<cb:define WorkingDirectory="$(WorkingBaseDir)\Initech.SuperCrm-DEV" />
<cb:define OutputDirectory="$(WorkingDirectory)\Initech.SuperCrm\bin\Debug" />
<cb:define ProjectFile="Initech.SuperCrm.sln" />
<cb:define NUnitLog="$(WorkingDirectory)\NunitResults.xml" />
<state type="state" directory="C:\CCNet\State"/>
<artifactDirectory>$(ArtifactDirectory)</artifactDirectory>
<workingDirectory>$(WorkingDirectory)</workingDirectory>
<triggers>
<!-- check the source control every X time for changes,
and run the tasks if changes are found -->
<intervalTrigger
name="continuous"
seconds="30"
buildCondition="IfModificationExists"
initialSeconds="5"/>
</triggers>
<sourcecontrol type="vsts">
<cb:vsts_ci/>
<workspace>CCNET_Initech.SuperCrm-DEV</workspace>
<project>$/InitechSuperCrm/SuperCrm/Initech.SuperCrm-DEV</project>
</sourcecontrol>
<tasks>
<exec>
<executable>C:\Program Files (x86)\DXperience 12.1\Tools\DXperience
\ProjectConverter-console.exe</executable>
<buildArgs>$(WorkingDirectory)</buildArgs>
</exec>
<msbuild>
<executable>$(MSBuildPath)\MSBuild.exe</executable>
<workingDirectory>$(WorkingDirectory)</workingDirectory>
<projectFile>$(ProjectFile)</projectFile>
<timeout>900</timeout>
<logger>$(MSBuildLogger)</logger>
</msbuild>
<exec>
<executable>$(NUnitExe)</executable>
<buildArgs>/xml=$(NUnitLog) /nologo $(WorkingDirectory)\$(ProjectFile)
</buildArgs>
</exec>
</tasks>
<publishers>
<buildpublisher>
<sourceDir>$(OutputDirectory)</sourceDir>
<useLabelSubDirectory>true</useLabelSubDirectory>
<alwaysPublish>false</alwaysPublish>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
</buildpublisher>
<merge>
<files>
<file>$(NUnitLog)</file>
</files>
</merge>
<xmllogger logDir="C:\CCNet\BuildArtifacts\Initech.SuperCrm-DEV\buildlogs" />
<artifactcleanup cleanUpMethod="KeepLastXBuilds"
cleanUpValue="50" />
</publishers>
</project>
</cruisecontrol>
I've been tearing my hair while trying to figure this out, and I don't have much to begin with, so any help would be greatly appreciated.
After a prolonged period of banging my head against the wall, I seem to have finally found the solution (well solutions).
1) Kobush.Build.dll (https://www.nuget.org/packages/Kobush.Build/) can be used as the logger for MSBuild. Looking at the attributions in CruiseControl.NET's documentation, it appears to have been written by the same developer (but extended).
2) Some tweaks were needed due to the default location of the msbuild-report output. Because, by default, it was dumped to the buildartifacts folder then it is susceptible to being prematurely deleted.
I no longer clean the publish directory prior to copying (in the buildpublisher) and perform the merge and xmllogger portions of the publisher before artifact cleanup.
As a result, I now have msbuild and nunit output/results integrated in to the main build log and these can be consumed through the CruiseControl.NET dashboard.
There's probably a tidier way of handling this, but at the moment I'm just getting a proof of concept going.
Error message:
System.Runtime.Serialization.SerializationException : Unable to find
assembly 'MyCompany.Plates, Version=12.15.0.0, Culture=neutral,
PublicKeyToken=0b9f95a95d107d22'.
+++++++++++++++++++ STACK TRACE: at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
There are two DLL files:
PlatesTests.dll and MyCompany.Plates.dll
The tests are all in PlatesTests.dll. The objects being serialized are in MyCompany.Plates.dll.
When run by passing PlatesTests.dll to nunit-console.exe, everything passes.
However, our build system uses a .nunit file as under:
<NUnitProject>
<Settings activeconfig="Default" />
<Config name="Default" binpathtype="Auto">
<assembly path="..\..\Build Products\ReleaseTests\PlatesTests.dll" />
</Config>
</NUnitProject>
And when the nunit-console is run against this .nunit file, it gives the above error.
How can I fix this problem?
I believe that you have to run the console project with /noshadow
From the documentation
The /noshadow option disables shadow copying of the assembly in order to provide improved performance.
This shadow copying sometimes causes assembly loading to fail for projects.
I fixed this by setting the appbase on the .nunit setting file to point to where PlatesTests.dll and MyCompany.Plates.dll are both located.
The new file looks like this:
<NUnitProject>
<Settings activeconfig="Default" appbase="..\..\Build Products\ReleaseTests" />
<Config name="Default" binpathtype="Auto">
<assembly path="..\..\Build Products\ReleaseTests\PlatesTests.dll" />
</Config>
</NUnitProject>
I want to figure out how I to set up the Pub/Sub sample from NServiceBus to work in the case of publisher malfunction.
When I start the samples and accidentaly close the Subscribers, if I restart everything works fine.
If however I kill the publisher and the subscriptions continue to work, if I restart the publisher, then it doesn't seem to know it has subscribers and doesn't post any messages.
I added the config entry
<MsmqSubscriptionStorageConfig Queue="subscriptions"/>
but it seems to not function... I miss something. I googled about MsmqSubscriptionStorageConfig and DbSubscriptionStorageConfig but i didn't find a solution.
Could someone point me in the right direction ?
I found that a couple additional steps are required in order to get this working with the Pub/Sub sample under .Net 4.0, using a SQLite subscription storage system.
Combining the previous suggestions with the new ones, here are the required changes, all of which apply to the MyPublisher project.
Add a reference to System.Data.SQLite. Be sure to choose the version that matches your desired architecture (x86/x64). These items can be found in the 'binaries' folder.
In the App.config file, add the following as a new configSection element:
<section name="DBSubscriptionStorageConfig"
type="NServiceBus.Config.DBSubscriptionStorageConfig, NServiceBus.Core" />
In the App.config file add, the following as a new configuration element:
<DBSubscriptionStorageConfig>
<NHibernateProperties>
<add Key="connection.provider"
Value="NHibernate.Connection.DriverConnectionProvider"/>
<add Key="connection.driver_class"
Value="NHibernate.Driver.SQLite20Driver"/>
<add Key="connection.connection_string"
Value="Data Source=.\Subscriptions.sqlite;Version=3;New=True;"/>
<add Key="dialect"
Value="NHibernate.Dialect.SQLiteDialect"/>
</NHibernateProperties>
</DBSubscriptionStorageConfig>
Add this chunk of XML to the configuration section of the NServiceBus.Host.exe.config file:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
You need to change the profile of the publisher to production.
See http://docs.particular.net/nservicebus/hosting/nservicebus-host/profiles
For debugging this way, go to the properties of the publisher project, into the Debug tab, and put in NServiceBus.Production in the Command line arguments of the Start Options section.