xsd 错误:访问路径被拒绝
我正在尝试使用 xsd 工具更新 xml 架构。运行它的脚本如下所示:
@ECHO OFF
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\xsd.exe" ArchiveServiceConfiguration.xsd /classes /language:CS /namespace:"SI.ArchiveService。 CommonLogic.ArchiveServiceConfiguration”
PAUSE
但以用户和管理员身份运行时都会出现写入错误。有什么建议吗?我可能会补充一点,旧文件位于团队资源管理器中的源代码控制之下。
D:\AK2\ArchiveService\CommonLogicModule\SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration>xsd.exe ArchiveServiceConfiguration.xsd /classes /language:CS /namespace:"SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration"
Microsoft (R) Xml 架构/数据类型支持公用事业 [Microsoft (R) .NET Framework,版本 2.0.50727.1432] 版权所有 (C) 微软公司。版权所有。
写入文件“D:\AK2\ArchiveService\CommonLogicModule\SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration\ArchiveServiceConfiguration.cs”。
错误:为架构“ArchiveServiceConfiguration”生成类时出错。 - 拒绝访问路径“D:\AK2\ArchiveService\CommonLogicModule\SI.ArchiveService.CommonLogic.ArchiveServiceConfiguration\ArchiveServiceConfiguration.cs”。
如果您需要更多帮助,请输入“xsd /?”。
I am trying to update an xml schema by using the xsd tool. The script running it looks like this:
@ECHO OFF
"C:\Program 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 /?".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ArchiveServiceConfiguration.cs 可能已经存在并且可能被 VS 使用(您是否正在运行 VS?)。更改xsd的输出路径。
The ArchiveServiceConfiguration.cs might already be there and possibly used by VS (Do you have VS running?) . Change the output path of xsd.
尝试删除该文件的只读属性或将其关闭。查看
attrib /?
DOS 命令。Try remove the read-only attribute of the file or close it. Look at the
attrib /?
DOS command.