Forum


HomeHomePremiumPremiumDevelopmentDevelopmentIllegal characters in pathIllegal characters in path
Previous
 
Next
New Post
10/29/2017 3:21 AM
 

Hi Aderson,

On attempting to compile a module in Visual Studio 2013 in the release configuration, I'm getting the following error:
"Error 108 Unable to copy file "**\*.sqldataprovider" to "C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\Package\**\*.sqldataprovider".
Illegal characters in path"

The lines this corresponds to in 'ModulePackage.targets' are:

    <CreateItem Include="**\*.sqldataprovider">
      <Output TaskParameter="Include" ItemName="SqlDataProviderFiles" />
    </CreateItem>

Files exist in the module under '\Providers\DataProviders\SqlDataProvider' with extension 'sqldataprovider'.

Also, the project was compiling fine yesterday, I'm not aware of changing anything to give this kind of error.

No problem in debug configuration.

I've tried googling this issue, didn't find very much that was any use.

Best Regards,

Steve

 
New Post
10/31/2017 12:22 AM
 

Hello,

I just want to add that there are two other lines associated with 'SqlDataProviderFiles':

<Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
<Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />

 

Just as a test, I tried removing these lines and recompiling which gives a different but similar error i.e.
Error 7 Unable to copy file "**\ReleaseNotes.txt" to "C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\Package\ReleaseNotes.txt". Illegal characters in path. C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\BuildScripts\ModulePackage.Targets 82 5

I don't know if it's related but there's also a warning:

Warning 5 The element 'Target' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'XmlRead' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Task, AL, AspNetCompiler, AssignCulture, AssignProjectConfiguration, AssignTargetPath, AxImp, CallTarget, CombinePath, ConvertToAbsolutePath, Copy, CreateCSharpManifestResourceName, CreateItem, CreateProperty, CreateVisualBasicManifestResourceName, Csc, Delete, Error, Exec, FindAppConfigFile, FindInList, FindUnderPath, FormatUrl, FormatVersion, GenerateApplicationManifest, GenerateBootstrapper, GenerateDeploymentManifest, GenerateResource, GenerateTrustInfo, GetAssemblyIdentity, GetFrameworkPath, GetFrameworkSdkPath, GetReferenceAssemblyPaths, LC, MakeDir, Message, Move, MSBuild, ReadLinesFromFile, RegisterAssembly, RemoveDir, RemoveDuplicates, RequiresFramework35SP1Assembly, ResolveAssemblyReference, ResolveComReference, ResolveKeySource, ResolveManifestFiles, ResolveNativeReference, ResolveNonMSBuildProjectOutput, SGen, SignFile, TlbImp, Touch, UnregisterAssembly, UpdateManifest, Vbc, VCBuild, Warning, WriteCodeFragment, WriteLinesToFile, XslTransformation, CodeAnalysis, CL, Link, BSCMake, CPPClean, Get.... C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\BuildScripts\ModulePackage.targets 9 6 FlexiContent


Best Regards,

Steve

 
New Post
10/31/2017 4:23 AM
 

Hi Steve,

I'm not really sure. I have plenty of modules around with the same settings as yours (just checked) and they all work fine.

I could try to compile on my environment and see how it goes if you want.

Cheers,

Aderson

 
New Post
10/31/2017 4:42 AM
 

Hi Aderson,

Thank you for your reply.

Do you mean to take my source code and compile it?

I am completely stuck with this issue, so anything's worth a try.

The fact that you have those lines and it didn't cause an issue for you, plus that I haven't had an issue until now sort of implies that the issue isn't the build file.

Best Regards,

Steve

 
New Post
10/31/2017 9:48 AM
 

Hi Aderson,

I am guessing you must just mean the build file :-)

Please see below, I've included the whole thing, the additions to the standard build file are the Entityframework.dll and EF.dll. I've left them in for completeness, but obviously, you won't have them in your environment.

I will email it to you, so you can have the original file, can't see how to attach it in this forum.

All the best 

Steve

<?xml version="1.0" encoding="windows-1252"?>

<!-- WARNING, WARNING, WARNING -->
<!-- REMEMBER THAT IF YOU MODIFY THE TARGETS FILE YOU NEED TO CLOSE/OPEN THE PROJECT FOR THE CHANGES TO TAKE EFFECT -->

<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="MSBuild.Community.Tasks.Targets" />
  <Target Name="PackageModule" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <XmlRead Prefix="n" Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
             XPath="dotnetnuke/packages/package[1]/@version"
             XmlFileName="$(DNNFileName).dnn">
      <Output TaskParameter="Value" PropertyName="Version" />
    </XmlRead>

    <!--in VS 2012 we exclude the packages folder -->
    <ItemGroup>     
      <InstallInclude Include="**\*.ascx" Exclude="packages\**" />
      <InstallInclude Include="**\*.asmx" Exclude="packages\**" />
      <InstallInclude Include="**\*.css" Exclude="packages\**" />
      <InstallInclude Include="**\*.html" Exclude="packages\**" />
      <InstallInclude Include="**\*.htm" Exclude="packages\**" />
      <InstallInclude Include="**\*.resx" Exclude="packages\**" />
      <InstallInclude Include="**\*.aspx" Exclude="packages\**" />
      <InstallInclude Include="**\*.js" Exclude="packages\**" />
      <InstallInclude Include="**\*.txt"  Exclude="**\obj\**;**\_ReSharper*\**;packages\**;" />
      <InstallInclude Include="**\images\**" Exclude="packages\**" />

      <!-- 20/07/2017 lines added -->
      <!--<installinclude Include="**\images\**\*.png" Exclude="packages\**"/>
      <installinclude Include="**\images\**\*.jpg" Exclude="packages\**"/>
      <installinclude Include="**\images\**\*.gif" Exclude="packages\**"/>
      <installinclude Include="**\images\**\*.ico" Exclude="packages\**"/>
      <installinclude Include="**\images\**\*.svg" Exclude="images\MyMenu\Templates\**;packages\**;"/>
      <InstallInclude Include="**\images\*.*" Exclude="packages\**" />-->

      
    </ItemGroup>

    <ItemGroup>
      <SourceInclude Include="**\*.ascx" />
      <SourceInclude Include="**\*.asmx" />
      <SourceInclude Include="**\*.css" />
      <SourceInclude Include="**\*.xsl" />
      <SourceInclude Include="**\*.html" />
      <SourceInclude Include="**\*.htm" />
      <SourceInclude Include="**\*.resx" />
      <SourceInclude Include="**\*.xml" Exclude="**\obj\**;**\_ReSharper*\**;" />
      <SourceInclude Include="**\*.aspx" />
      <SourceInclude Include="**\*.js" />
      <SourceInclude Include="**\*.txt" Exclude="**\obj\**;**\_ReSharper*\**;" />
      <SourceInclude Include="**\images\**" />
      <SourceInclude Include="**\*.cs" />
    <SourceInclude Include="**\Packages\**" />
      <SourceInclude Include="**\*.cs.designer" />
      <SourceInclude Include="**\*.csproj" />
      <SourceInclude Include="**\*.targets" />
      <SourceInclude Include="**\*.sln" />         
    </ItemGroup>

    <CreateItem Include="$(DNNFileName).dnn">
      <Output TaskParameter="Include" ItemName="PackageManifestFiles" />
    </CreateItem>

    <CreateItem Include="**\License.txt">
      <Output TaskParameter="Include" ItemName="PackageTxtFiles" />
    </CreateItem>

    <CreateItem Include="**\ReleaseNotes.txt">
      <Output TaskParameter="Include" ItemName="PackageTxtFiles" />
    </CreateItem>

    <CreateItem Include="**\*.sqldataprovider">
      <Output TaskParameter="Include" ItemName="SqlDataProviderFiles" />
    </CreateItem>

    <Copy SourceFiles="$(MSBuildDnnBinPath)\$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
    <Copy SourceFiles="$(MSBuildDnnBinPath)\EF.dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
    <Copy SourceFiles="$(MSBuildDnnBinPath)\EntityFramework.dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>

    <Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
    <Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
    <Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
    
    
    <!-- create the INSTALL RESOURCES.ZIP file -->
    <Copy SourceFiles="@(InstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)" />

    <CreateItem Include="$(MSBuildProjectDirectory)\ResourcesZip\**\*.*">
      <Output TaskParameter="Include" ItemName="ResourcesContent" />
    </CreateItem>
    
    <Zip Files="@(ResourcesContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(Extension)" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder="package/" />

    <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*">
      <Output TaskParameter="Include" ItemName="OutputContent" />
    </CreateItem>
    <!-- Create the Install package -->    
    <Zip Files="@(OutputContent)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Install.$(Extension)" />
    <!-- Copy the Install package to the Packages folder -->
    <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder="install/" />
    
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" />
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\ResourcesZip" />
    
    <Copy SourceFiles="$(MSBuildDnnBinPath)\$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>    
    <!-- Copy the bin files to the temporary Package folder -->
    <Copy SourceFiles="$(MSBuildDnnBinPath)\EF.dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
    <Copy SourceFiles="$(MSBuildDnnBinPath)\EntityFramework.dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>


    <Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
    <Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
    <Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />

    <!-- create the SOURCE RESOURCES.ZIP file -->
    <Copy SourceFiles="@(SourceInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)" />

    <CreateItem Include="$(MSBuildProjectDirectory)\ResourcesZip\**\*.*">
      <Output TaskParameter="Include" ItemName="SourceContent" />
    </CreateItem>

    <Zip Files="@(SourceContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(Extension)" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder="package/" />

    <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*">
      <Output TaskParameter="Include" ItemName="OutputSource" />
    </CreateItem>

    <Zip Files="@(OutputSource)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Source.$(Extension)" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Source.$(Extension)" DestinationFolder="install/" />

    <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" />
    <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Source.$(Extension)" />
    <Delete Files="$(MSBuildProjectDirectory)\Resources.Zip" />
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" />
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\ResourcesZip" />
    
  </Target>
</Project>

 

 

 

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentIllegal characters in pathIllegal characters in path



Try FREE
30 days money back guaranteed