Mats, Can you try downloading today's nightly build ?
Thanks, Gert ----- Original Message ----- From: "Mats Cederholm" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 02, 2004 9:59 AM Subject: [nant-dev] PolicyException.... Hi guys, first of all thanks for an excellent tool! I know I risked this by running the latest nigtly build (wanted to try the <svn> task) but I thought you might want the information (I'd like a solution too if possible :)) What happend is that I added subversion tasks to my build file (which was running perfectly before). But the problem does not seem to be subversion but starts when compiling with the <solution> task and it seems like a policy(?!) problem. The permissions of the user running the script has not changed and no domain or local policies have changed so I find it a bit strange. And no, this is not a late april fools day joke even though it was run on april 1:st :) Take a look and see if you have any idea. TIA, Mats Output and buildfile as follows /*************************************************************************** ************* E:\Builds\CRM\Integration>nant NAnt 0.85 (Build 0.85.1552.0; net-1.1.win32; nightly; 2004-04-01) Copyright (C) 2001-2004 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///E:/Builds/CRM/Integration/SalusAnsvar.CRM.Integration.Main.bu ild Target(s) specified: Release [echo] Starting NAnt build Release: SVNUpdate: [svn] command name: update [svn] working directory: E:\Builds\CRM\Integration [svn] executable: C:\Program Files\Subversion\bin\svn.exe [svn] arguments: update At revision 91. SetBuildVersion: [version] Build number '0.9.32.6408'. [exec] C:\Program Files\Subversion\bin\svn.exe commit E:\Builds\CRM\Integra tion -m "Build engine updated versions in assemblyinfo files" Sending SalusAnsvar.CRM.Integration.BusinessLogic\AssemblyInf o.cs Sending SalusAnsvar.CRM.Integration.DataAccess\AssemblyInfo.c s Sending SalusAnsvar.CRM.Integration.Schemas\AssemblyInfo.cs Sending SalusAnsvar.CRM.Integration.Services.CRMContractRecei ver\AssemblyInfo.cs Sending SalusAnsvar.CRM.Integration.Services.CRMCustomerRecei ver\AssemblyInfo.cs Sending SalusAnsvar.CRM.Integration.Services.Shared\AssemblyI nfo.cs Sending SalusAnsvar.CRM.Integration.Shared\AssemblyInfo.cs Sending SalusAnsvar.CRM.Integration.Test\AssemblyInfo.cs Sending SalusAnsvar.CRM.Integration.Test.Web\AssemblyInfo.cs Sending SalusAnsvar.CRM.Integration.WS\AssemblyInfo.cs Sending SalusAnsvar.CRM.Shared\AssemblyInfo.cs Sending SalusAnsvar.CRM.Shared.WinForms\AssemblyInfo.cs Transmitting file data ............ Committed revision 92. PrepareDirectories: [mkdir] Creating directory 'E:\Builds\CRM\Integration\Build\0.9.32.6408'. Build: [solution] Starting solution build. [solution] Only C#, VB.NET and C++ projects are supported. Skipping project 'K MPROD\KMPROD.dbp'. [solution] Only C#, VB.NET and C++ projects are supported. Skipping project 'M ARS\SAMARS.dbp'. BUILD FAILED INTERNAL ERROR System.Security.Policy.PolicyException: Required permissions cannot be acquired. Server stack trace: at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, B oolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Ass embly locationHint, StackCrawlMark& stackMark) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence security Evidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm) at NAnt.VSNet.GACResolver.IsAssemblyInGAC(String filename) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(M ethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInC ontext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes sage msg, Int32 methodPtr, Boolean fExecuteInContext) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req Msg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa ta, Int32 type) at NAnt.VSNet.GACResolver.IsAssemblyInGAC(String filename) at NAnt.VSNet.ReferenceGACCache.IsAssemblyInGac(String filename) at NAnt.VSNet.Reference.ResolveFromPath(String path) at NAnt.VSNet.Reference.ResolveFromHintPath(XmlElement referenceElement) at NAnt.VSNet.Reference.ResolveAssemblyReference(XmlElement referenceElement) at NAnt.VSNet.Reference..ctor(Solution solution, ProjectSettings ps, XmlEleme nt elemReference, ReferenceGACCache gacCache, SolutionTask solutionTask, Directo ryInfo outputDir) at NAnt.VSNet.Project.Load(Solution sln, String projectPath) at NAnt.VSNet.ProjectFactory.LoadProject(Solution sln, SolutionTask slnTask, TempFileCollection tfc, ReferenceGACCache gacCache, DirectoryInfo outputDir, Str ing path) at NAnt.VSNet.Solution.LoadProjects() at NAnt.VSNet.Solution..ctor(FileInfo solutionFile, ArrayList additionalProje cts, ArrayList referenceProjects, TempFileCollection tfc, SolutionTask solutionT ask, WebMapCollection webMaps, FileSet excludesProjects, DirectoryInfo outputDir ) at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Tasks.CallTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Please send bug report to [EMAIL PROTECTED] Total time: 32.4 seconds. E:\Builds\CRM\Integration> *******************************************************/ Build file: /****************************************************** <?xml version="1.0"?> <project name="CRM.Integration" default="Release"> <echo message="Starting NAnt build" /> <property name="solution.version" value="" readonly="False" /> <property name="solution.basedir" value="E:\Builds\CRM\Integration" readonly="True" /> <property name="solution.build.basedir" value="${solution.basedir}\Build" /> <property name="solution.build.targetdir" value="${solution.build.basedir}\LatestVersion" /> <property name="solution.buildfile" value="${solution.basedir}\SalusAnsvar.CRM.Integration.build" /> <target name="SVNUpdate" description="Updates the working copy from the repository"> <!-- Update to HEAD revision from repository--> <svn command="update" destination="." svnroot="svn://sadev01/CRM/Integration" password="123456" /> </target> <target name="SetBuildVersion" depends="SVNUpdate"> <version prefix="solution." path="${solution.build.basedir}\build.number" buildtype="increment" revisiontype="automatic" /> <property name="solution.build.versiondir" value="${solution.build.basedir}\${solution.version}" /> <foreach property="assemblyinfo.file" item="File"> <in> <items basedir="${solution.basedir}"> <includes name="SalusAnsvar.CRM*\Assemblyinfo.cs" /> <excludes name="SalusAnsvar*MessageTool*\*.*" /> <excludes name="SalusAnsvar*WebServiceClient*\*.*" /> </items> </in> <do> <script language="C#"> <code><![CDATA[public static void ScriptMain(Project project) { string fileName = project.Properties["assemblyinfo.file"]; string fileContent; string buildVersion = project.Properties["solution.version"]; StreamReader sr = File.OpenText(fileName); fileContent = sr.ReadToEnd(); sr.Close(); System.Text.RegularExpressions.Regex rx = new System.Text.RegularExpressions.Regex("AssemblyVersion\\(.*\\)"); fileContent = rx.Replace(fileContent, String.Format(@"AssemblyVersion(""{0}"")", buildVersion)); StreamWriter sw = new StreamWriter(fileName, false, System.Text.Encoding.UTF8); sw.Write(fileContent); sw.Flush(); sw.Close(); } ]]></code> </script> </do> </foreach> <exec program="svn.exe" commandline="commit ${solution.basedir} -m "Build engine updated versions in assemblyinfo files"" basedir="C:\Program Files\Subversion\bin\" /> </target> <target name="PrepareDirectories" depends="SetBuildVersion"> <mkdir dir="${solution.build.targetdir}" /> <mkdir dir="${solution.build.versiondir}" /> </target> <target name="Build" depends="PrepareDirectories" description="Build solution using nant solution task"> <solution solutionfile="${solution.basedir}\SalusAnsvar.CRM.Integration.sln" configuration="Release" outputdir="${solution.build.targetdir}\${solution.buildtarget}"> <webmap> <map url="http://localhost/SalusAnsvar.CRM.Integration.Test.Web/SalusAnsvar.CRM.I ntegration.Test.Web.csproj" path="${solution.basedir}\SalusAnsvar.CRM.Integration.Test.Web\SalusAnsvar.C RM.Integration.Test.Web.csproj" /> </webmap> </solution> <!--nant buildfile="${solution.buildfile}" target="${solution.buildtarget}" verbose="true" /--> <echo message="Copying shared dll's" /> <copy todir="${solution.build.targetdir}\${solution.buildtarget}"> <fileset basedir="${solution.build.basedir}\SharedBinaries"> <includes name="*log4net*.*" /> <includes name="amqmdnet.dll" /> <includes name="ICSharpCode.SharpZipLib.dll" /> </fileset> </copy> <echo message="Copying configuration files" /> <copy file="${solution.basedir}\SalusAnsvar.CRM.Integration.Services.CRMContractRe ceiver\App.config" tofile="${solution.build.targetdir}\${solution.buildtarget}\CRMContractRecei ver.exe.config" /> <copy file="${solution.basedir}\SalusAnsvar.CRM.Integration.Services.CRMCustomerRe ceiver\App.config" tofile="${solution.build.targetdir}\${solution.buildtarget}\CRMCustomerRecei ver.exe.config" /> </target> <target name="NDoc" depends="Build"> <!-- use ndoc to build sdk doc if they are not uptodate--> <ifnot uptodatefile="${solution.build.targetdir}/doc/sdk/*.chm"> <comparefiles basedir="${solution.build.targetdir}\${solution.buildtarget}"> <includes name="SalusAnsvar*.dll" /> <excludes name="SalusAnsvar*Schemas*.*" /> </comparefiles> <ndoc> <assemblies basedir="${solution.build.targetdir}\${solution.buildtarget}"> <includes name="SalusAnsvar*.dll" /> <excludes name="SalusAnsvar*Schemas*.*" /> <excludes name="SalusAnsvar*Web*.*" /> </assemblies> <documenters> <documenter name="MSDN"> <property name="OutputDirectory" value="${solution.build.targetdir}/doc/sdk" /> <property name="OutputTarget" value="HtmlHelp" /> <property name="LinkToSdkDocVersion" value="SDK_v1_1" /> <property name="HtmlHelpName" value="CRM Integration API Documentation" /> <property name="IncludeFavorites" value="False" /> <property name="Title" value="CRM Integration SDK Documentation - v.${solution.version}" /> <property name="SplitTOCs" value="False" /> <property name="DefaulTOC" value="" /> <property name="ShowVisualBasic" value="True" /> <property name="ShowMissingSummaries" value="True" /> <property name="ShowMissingRemarks" value="True" /> <property name="ShowMissingParams" value="True" /> <property name="ShowMissingReturns" value="True" /> <property name="ShowMissingValues" value="True" /> <property name="DocumentAttributes" value="True" /> <property name="ShowTypeIdInAttributes" value="True" /> <property name="DocumentInternals" value="False" /> <property name="DocumentPrivates" value="False" /> <property name="DocumentProtected" value="True" /> <property name="DocumentEmptyNamespaces" value="False" /> <property name="IncludeAssemblyVersion" value="False" /> <property name="CopyrightText" value="Copyright (C) 2003-2004 SalusAnsvar" /> <property name="CopyrightHref" value="http://www.salusansvar.se" /> <property name="EditorBrowsableFilter" value="Off" /> </documenter> </documenters> </ndoc> <delete> <fileset basedir="${solution.build.targetdir}/doc/sdk"> <includes name="*.*" /> <excludes name="*.chm" /> </fileset> </delete> </ifnot> </target> <target name="CopyToVersionFolder" depends="NDoc"> <echo message="Copying build from ${solution.build.targetdir} to version folder ${solution.build.versiondir}" /> <copy todir="${solution.build.basedir}\${solution.version}"> <fileset basedir="${solution.build.targetdir}"> <includes name="**\*.*" /> </fileset> </copy> <zip zipfile="${solution.build.basedir}\${solution.version}\${solution.version}.z ip"> <fileset basedir="${solution.build.targetdir}"> <includes name="**\*.*" /> </fileset> </zip> </target> <target name="Release"> <property name="solution.buildtarget" value="Release" /> <call target="CopyToVersionFolder" /> </target> <target name="Debug"> <property name="solution.buildtarget" value="Debug" /> <call target="CopyToVersionFolder" /> </target> </project> ****************************************************/ ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
