I am trying to update an xml schema by using the xsd tool. The script running it looks like this:
@ECHO OFF
"C:\Progra开发者_StackOverflow社区m Files\Microsoft SDKs\Windows\v6.0A\bin\xsd.exe" ArchiveServiceConfiguration.xsd /classes /language:CS /namespace:"SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration"
PAUSE
But there is a writing error both when running it as user and as administrator. Any suggestions? I might add that it the old file is under source control in team explorer.
D:\AK2\ArchiveService\CommonLogicModule\SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration>xsd.exe ArchiveServiceConfiguration.xsd /classes /language:CS /namespace:"SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration"
Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 2.0.50727.1432] Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'D:\AK2\ArchiveService\CommonLogicModule\SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration\ArchiveServiceConfiguration.cs'.
Error: Error generating classes for schema 'ArchiveServiceConfiguration'. - Access to the path 'D:\AK2\ArchiveService\CommonLogicModule\SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration\ArchiveServiceConfiguration.cs' is denied.
If you would like more help, please type "xsd /?".
The ArchiveServiceConfiguration.cs might already be there and possibly used by VS (Do you have VS running?) . Change the output path of xsd.
Try remove the read-only attribute of the file or close it. Look at the attrib /?
DOS command.
精彩评论