获取错误“尝试执行未经授权的操作”打开预先存在的.sln文件时 [英] Getting error "Attempted to perform an unauthorized operation" when opening a pre-existing .sln file

查看:186
本文介绍了获取错误“尝试执行未经授权的操作”打开预先存在的.sln文件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述














I已经分配了一台从Windows 7升级到Windows 10的PC。在尝试打开发送给我的VS .sln文件时,我会收到错误"...导入的项目C:\ Windows.Microsoft.Net \ Framework\v3.5\Microsoft.CompactFramework.VisualBasic.targets 
未找到。确认< Import>中的路径声明是正确的,并且该文件存在于磁盘上  


 我发现这是一台从Windows 7升级到Windows 10的电脑,因为VS抱怨的文件丢失了在C:\ Windows.old下面的相同路径中找到。将丢失的.targets文件从C:\ Windows.old复制到上面的路径,现在是
在尝试打开.sln文件时出现此错误  ..."尝试执行未经授权的操作"。尝试通过命令登录启动VS ... denvenv.exe / log< path-to-file> 但是这只是输出一个包含几个条目的xml文件
,没有错误表明可能出错的地方。任何建议??


这是使用Visual Studio 2008

解决方案

你好ChrisBrady,


这个项目是否由任何源代码控制工具控制?


请创建一个新的默认项目,然后复制解决方案文件基于解决方案结构逐个进入新项目。


此外,请以管理员身份运行Visual Studio 2008,以确保它具有足够的权限来执行任何操作。


您还可以尝试删除存储此解决方案的用户设置的.suo文件。删除后,请再次打开您的解决方案,它将生成一个新的.suo文件。




最好的问候,

Weiwei


I have been assigned a pc which IT upgraded from Windows 7 to Windows 10. In trying to open VS .sln files sent to me I would get the error "...The imported project C:\Windows'Microsoft.Net\Framework\v3.5\Microsoft.CompactFramework.VisualBasic.targets  was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on the disk" 

 I figured out this was a pc upgraded from Windows 7 to Windows 10 because the files that VS complained were missing were found in the same path above under C:\Windows.old. Copied the missing .targets files from C:\Windows.old to above path and am now getting this error when trying to open the .sln file ... "Attempted to perform an unauthorized operation". Tried starting VS with logging on via the command ... denvenv.exe /log <path-to-file>  but that just puts out an xml file containing several entries with no error indicating what may have gone wrong. Any suggestions??

This is using Visual Studio 2008



解决方案

Hi ChrisBrady,

Is this project controlled by any source control tool?

Please create a new default project and then copy the solution files to the new project one by one based on the solution structure.

In addition, please run your Visual Studio 2008 as administrator to make sure it has enough permission to do any operations.

And you also could try delete the .suo file which stored user settings for this solution. After deleting, please open your solution again, it will generate a new .suo file.


Best Regards,
Weiwei


这篇关于获取错误“尝试执行未经授权的操作”打开预先存在的.sln文件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆