Red Gate forums :: View topic - SmartAssembly build failed + msbuild + tfs
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

SmartAssembly build failed + msbuild + tfs

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
stefaan



Joined: 11 May 2011
Posts: 2

PostPosted: Wed May 11, 2011 9:50 am    Post subject: SmartAssembly build failed + msbuild + tfs Reply with quote

I have just updated my version of smartassembly to version 6.0. (I uninstalled version 5 and installed version 6).

When i try to build my project using tfs I receive the folowing error.

C:\Builds\....\: error : SmartAssembly build failed:
C:\Builds\....\ : The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Here you can find the c# project file
Code:

<UsingTask TaskName="SmartAssembly.MSBuild.Tasks.Build" AssemblyName="SmartAssembly.MSBuild.Tasks, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7f465a1c156d4d57" />
  <Target Name="BeforeBuild" Condition=" '$(Configuration)' == 'Release' ">
    <CreateProperty Value="true">
      <Output TaskParameter="Value" PropertyName="RunSmartAssembly" />
    </CreateProperty>
  </Target>
  <Target Name="AfterBuild" Condition=" '$(RunSmartAssembly)' != '' ">
    <SmartAssembly.MSBuild.Tasks.Build ProjectFile="D:\{smartAssembly}\xxx.Sdk.saproj" />
  </Target>


Here you can find the smart assembly project file

Code:

<SmartAssemblyProject ProjectId="{e388b26e-0ab5-4a77-861d-bf9767c5ae4c}" Version="2.0">
    <MainAssemblyFileName>..\Development\xxx\xxx.Sdk.dll</MainAssemblyFileName>
    <Configuration Name="Release">
        <ApplicationName />
        <Destination DestinationFileName="..\Production\SDK20\xxx.Sdk.dll" />
        <Assemblies>
            <Assembly AssemblyName="xxx.Sdk, Culture=neutral, PublicKeyToken=b602da213aee6670">
                <Merging>
                    <ResourcesCompression />
                    <MemberRefsProxy />
                    <Pruning Prune="1">
                        <Exclusion />
                    </Pruning>
                    <Obfuscation Obfuscate="1">
                        <Exclusion />
                    </Obfuscation>
                    <ControlFlow Obfuscate="1" />
                    <ResourcesPruning />
                </Merging>
            </Assembly>
        </Assemblies>
        <Options>
            <Obfuscation FieldsNameMangling="2" NameMangling="2" />
            <ExceptionReporting Template="res:{SmartExceptions}.1033.dll" />
            <StrongNameSigning KeyFileName="C:\Resources\XRD.pfx" Password="****" Sign="1" />
            <OtherProtections AddMetadataStream="1" SuppressIldasm="1" />
            <StringsEncoding />
            <OtherOptimizations />
            <Debugging />
            <FeatureUsageReporting Template="res:SmartUsageWithUIConsentFirstRun1033.dll" />
        </Options>
    </Configuration>
</SmartAssemblyProject>
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6674

PostPosted: Thu May 12, 2011 4:37 pm    Post subject: Reply with quote

Thanks for your post. Unfortunately we cannot tell from this information if it's MSBUILD not finding SmartAssembly, SmartAssembly unable to load the project, or something else, like a crypto key that can't be found.

Have you check that you have SmartAssembly.MSBuild.Tasks version 6.0.0.0 in your GAC?
Back to top
View user's profile Send private message
stefaan



Joined: 11 May 2011
Posts: 2

PostPosted: Fri May 13, 2011 8:08 am    Post subject: Reply with quote

I have checked this and, the msbuild dll is present in the gac. I now fixed this by executing smart assembly using the command line interface.
Back to top
View user's profile Send private message
michaelb6



Joined: 03 Oct 2011
Posts: 1

PostPosted: Mon Oct 03, 2011 7:55 am    Post subject: Reply with quote

On 64-bit there are 2 msbuild.exe:

1) c:\windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe

fails with
Smartassembly failes with The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

2) c:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
Works!
Back to top
View user's profile Send private message
rs



Joined: 12 May 2010
Posts: 11

PostPosted: Sat Oct 08, 2011 11:24 am    Post subject: Reply with quote

This problem exists because the SmartAssembly setup does not write the install path to the 64bit portion of the registry - therefore when running under the 64bit msbuild process the smartassembly msbuild task cannot find the location of smartassembly.com.

You can fix this particular problem by setting this value manually:
HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SmartAssembly 6\Path="C:\Program Files\Red Gate\SmartAssembly 6\"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group