Silverlight permission?? error - silverlight-4.0

While trying to build one of the targets of my project, I get an error which seems to be a permission issue. And am struggling to resolve this issue. The issue is pasted below. Any suggestion would be of great help. Thanks for your patience and help.
"R:\Export\Exporting.sln" (default target) (2)
"R:\Export\WebHost\Export.WebHost.csproj" (default target) (70)
"R:\Export\WebHost\SilverlightClient\Export.SilverlightClient.csproj" (default target) (71:2)
(ValidateXaml target)
C:\Program Files\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.Common.targets(214,9): error : Could not load the assembly file:///R:\Report\Export\SilverlightClient\obj\Debug\Export.SilverlightClient.dll.
This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information. [R:\Export\SilverlightClient\Export.SilverlightClient.csproj]"
Where R: is a Clearcase Snapshot view.
The tip ( http://go.microsoft.com/fwlink/?LinkId=179545 ) is not helping since that dll is not blocked as assumed.
-Bobs

I could solve this issue by editing two config files.
<>:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config
and
<>\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe.config
added the entry within "runtime".
This msdn link helped me -> http://msdn.microsoft.com/en-us/library/dd409252.aspx
-bobs

Related

VS2017: Solution builds but publish fails

I have a solution with 3 Websites and 1 Web API project. When I build the solution there is no issue but when I publish the Web API project to file folder, I get a lot of errors and the publish fails. One of the error is:
Error CS0006 Metadata file
'D:\Projects\MyAppName\Code\MyAppName\BusinessObjects\bin\Release\BusinessObjects.dll'
could not be found.
Other issues are similar to:
Error CS0246 The type or namespace name 'Amazon' could not be found
(are you missing a using directive or an assembly reference?)
I have checked in the project. The referenced DLL(Amazon) is available and this issue doesn't occur when I build the solution.
What could be the issue? I have also checked if there is any missing file(checking for yellow exclamation icon in front of file name) but I couldn't find one.
VS2017: Solution builds but publish fails
(According to the error messages, they are all common errors. we could not give the most direct correct answer for this issue, we can only give you some troubleshootings. In order to avoid losing contact in the round-trip comments, I post those troubleshootings as answer instead of comments.).
You can try:
Clean solution then rebuild it.
Go to Solution Explorer. Right click on Solution. Go to Properties. Go to Configuration Manager. Check if the checkboxes under Build are checked or not. If any or all of them are unchecked, then check them and try build the solution again.
Remove the project reference and then adding it back in again, and check if all those missing dll file exists in the bin folder.
Delete bin/obj folder, build again and try to restart Visual Studio.

Wx widgets resource file error

I am facing this annoying error
"Fatal error rc1015: cannot open include file wx/msw/rcdefs.h".
I am on Windows 10 and visual studio 12. Anybody has an idea about this.
Thanks
You have almost surely (because you don't say that you did it, when this would really be the first thing to check) forgot to specify the correct include paths for your resource compiler. Just add $(WXWIN)/include to the list of directories searched by it.
If you are using Visual Studio, Go to the
Project -> Properties -> Resources -> General -> Additional Include Directories
and add the include path of wxwidget (wxwidgets path/include) to it.

Visual Basic - MSBuild Not Running

I am trying to build a program for x64, but I keep getting the following error messages:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2554,5): error MSB4216: Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR4" and architecture "x64". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe" exists and can be run.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2575,7): error MSB4028: The "GenerateResource" task's outputs could not be retrieved from the "FilesWritten" parameter. Object does not match target type.
MSBuild.exe exists and can be run, so I don't know why I am getting these errors.
I am using Visual Basic in Visual Studio Professional 2013 (Update 4). I am not using any DLLs, all I am creating is a standalone .exe file.
I've tried searching, both here and on Google, but cannot find anything helpful. Then again, I have a tendency to overlook things, so the answer has probably been screaming in my face for the last hour. I apologise in advance if this turns out to be the case.
Any and all help is very much appreciated.
replace
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe
by
C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe
and try.it should do some difference.this occurs because the version on msBuild.exe has changed after update4 of vs2013.check for version differences..
also i suspect you are trying to build the solution in x86 architecture.if first solution doesnt work,go to the Build tab, change the Platform target from Any CPU" to "x86" and try. hope it helps.
I just encountered this exact same error in a multiple project VB solution when trying to start a debug instance of one project. By forcing a rebuild of that one project I was able to fix the issue and start the debug instance.
I solved this problem by opening the project in Visual Studio 2017, instead of 2015

Visual Studio 2013 C# Web Project builds but IDE reports The type or namespace name xxx could not be found error

When opening an MVC4 C# web project in Visual Studio 2013, the IDE reports the error "The type or namespace name '_' could not be found (are you missing a using directive or an assembly reference)", but the project builds and runs without any errors. Furthermore, intellisense does not include the project namespace.
The "missing" reference is to files within the same project.
for example; the web project namespace is "webproject.com", and references in a controller files to "webproject.com.models" is underlined in red with the error above.
I have checked the following:
All Solution projects are configured to use the same Target Framework(.Net 4)
web.config in the Views folder contains the namespace in the system.web.webPages.razor section
cleaned and rebuilt solution
deleted all bin and obj content
deleted .suo and .csproj.user files that were created by VS2010
The only way that I can get rid of these errors being reported in VS2013 is to unload then reload the project.
When opened in Visual Studio 2010 I do not get these problems.
I have the same issue.
ALthough the project compiles correctly, the code editor shows an error The type or namespace name '_' could not be found (are you missing a using directive or an assembly reference).
THere is one workaround. Just delete the *.SUO files and re-open the solution. THen for this only Session it works. Unfortunately after closing and reopening the solution the issue is back again. VS 2012 works fine.
Seems to be a bug in VS 2013....
My solution, when I encountered the problem with VS 2013 Express edition was to simply unload the offending project and reload. Opening the SUO or Project file and making changes had not affect.
Try to unload the project in VS2013, then right click the node and select edit "projectname.csproj". Check the individual references they might point to somewhere strange.
EDIT: the csproj file is an xml file and the references are located under Project -> ItemGroup -> Reference
I had the same issue.
It's a VS 2012 solution with different projects.
Search for all *.suo files and deleted them.
Rebuild and reopen Visual Studio.
There's a known issue with Web Application projects when bound to a TFS server that sounds like this issue. This occurs when the following TFS setting option is checked:
Options -> Source Control -> Environment -> Get everything when a solution or project is opened.
Disabling this option resolves the problem.
thanks,
Miguel Lacouture
[MSFT]
Same issue, on project reference.
I opened the referenced project file (*.csproj) with a text editor and did some cleanup:
1) reset these properties' values:
<PublishUrl>publish\</PublishUrl>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
2) removed dirty platform/configurations:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x86|AnyCPU'">
...
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x86|x86'">
...
Now I can compile without any issue.
Glad to share it with you! :))
Same issue. Opening the project's properties and making a change to the name (or any value) and then rebuilding seems to have resolved it.
I have just had this problem and none of the solutions here helped. I fixed mine by doing a repair of Visual Studio (An option when you select to uninstall the program). Hope this helps someone
I had same issue when I added a new class file ( e.g. MyClass.cs) and called it in some other C# code places. For some reason VS did not add that new class file to my working project folder (not seen in VS, but seen in Windows File Explorer). And, hence, the compile path for new class file is not included in the compile section of my project file (e.g. MyProject.csproj). So to solve this problem, First, right click on your working project > Add > Existing Item ... > Select your new class > OK.
Then, check the project file (*.csproj) and make sure a new element is inserted in the compile section such as:
Finally, rebuild your project and the problem should be solved.
Another reason for this issue is the project, I had long ago with VS, is my other project was set up with Client Profile as its target framework. So, to solve the issue: Right click your project in VS > Properties > Application tab > make sure Target Framework option is not Client Profile. You should change all projects in your solution to the same framework version AND all of them must not have Client Profile option.
Microsoft just released a new security update to be automatically applied to machines configured to use Microsoft Update.
Unfortunately, some ASP.NET MVC 3 and 4 VS projects can no longer build after the update is applied. These projects will fail with the following error:
"Could not locate the assembly "System.Web.Mvc,Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL"
My project also had the error "The type or namespace name 'System.Web.Mvc' could not be found (are you missing a using directive or an assembly reference)". Installing the latest version of Microsoft.AspNet.Mvc solved my problem. See the following article from Microsoft for more info:
http://blogs.msdn.com/b/webdev/archive/2014/10/16/microsoft-asp-net-mvc-security-update-broke-my-build.aspx
Unloading and then reloading the project worked for me.

Error 'TF215097:...Cannot create unknown type for...' custom CodeActivity [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
TFS 2010 Custom Build Activity TF215097 error
I'm trying to create a CustomActivity to run after each successful build.
I've followed the exact steps of several tutorials
http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2010/03/08/lessons-learnt-building-a-custom-activity-to-run-typemock-isolator-in-vs2010-team-build.aspx
http://www.ewaldhofman.nl/post/2010/04/29/Customize-Team-Build-2010-e28093-Part-4-Create-your-own-activity.aspx
http://www.dotnetcurry.com/ShowArticle.aspx?ID=522&AspxAutoDetectCookieSupport=1
And all have lead me to the same result - The build fails after several seconds with this error:
TF215097: An error occurred while initializing a build for build definition
\MyCompany\Dev - Client: Cannot create unknown type '{clr-
namespace:BuildTasks.Activities;assembly=BuildTasks}TFSBuildLocalizer'.
I came down to a point where I have removed all custom references I had in the CodeActivity project and commented out all of the code.
I have added the output dll to the TFS, and I have the following post build script in the project's properties:
"$(DevEnvDir)\TF.exe" checkout "$/MyCompany/Development/Djenne/Dev/Tools/BuildProcess/Output/$(TargetFileName)"
copy /Y "$(TargetPath)" "C:\tfs2010\MyCompany\Dev\Tools\BuildProcess\Output\$(TargetFileName)"
"$(DevEnvDir)\TF.exe" checkin "$/MyCompany/Development/Djenne/Dev/Tools/BuildProcess/Output/$(TargetFileName)"
I've made sure that the namespace in the workflow xaml is correct for the custom CodeActivity.
I have no idea what else can I try,
Please help!
Thanks,
EDIT: I'm adding more descriptions about what I've already tried:
The CodeActivity class already have the attribute:
[BuildActivity(HostEnvironmentOption.All)]
The CodeActivity class is contained inside an Activity Library project.
Here is the ProjectTypeGuids tag inside the csproj file:
<ProjectTypeGuids>{32f31d43-81cc-4c15-9de6-3fc5453562b6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
In the custom workflow xaml I've added my CodeActivity right after "Get Impacted Tests, Index Sources and Publish Symbols"
I currently don'e have any InArgument nor OutArgument in my CodeActivity.
These are the references in my CodeActivity project:
Microsoft.CSharp
Microsoft.TeamFoundation.Build.Client
System
System.Activities
System.Core
System.Data
System.Data.DataSetExtensions
System.Xaml
System.Xml
System.Xml.Linq
WindowsBase
In "Build Controller Properties" I have set the "Version control path to custom assemblies" with the same TFS path as my post build script:
$/MyCompany/Development/Djenne/DEV/Tools/BuildProcess/Output
In my Build Definition I've set "Build process template" with my custom workflow xaml.
Thank you guys for the answers, do you have any more thoughts?
Thanks
Ok, I got this thing figured out.
Here's what worked for me:
I've installed my dll to the GAC in the build server, ran the build and suddenly it worked!
gacutil.exe /i buildtasks
Afterwards, I've uninstalled the dll from the GAC, and it keeps working even still.
gacutil.exe /u buildtasks
Another thing, my project had several references which I also had to checkin in the same directory as the CodeActivity dll itself.
So to do that I've changed my project's post build script:
cd "C:\tfs2010\Djenne\Dev\Tools\BuildProcess\Output\"
"$(DevEnvDir)\TF.exe" checkout "$/TradeNetworks/Development/Djenne/Dev/Tools/BuildProcess/Output/*.*"
xcopy "$(TargetDir)*.*" "C:\tfs2010\Djenne\Dev\Tools\BuildProcess\Output\" /E /R /C /Y
The only thing left to do now is to figure out how to debug this damn thing.
But that's an issue for another question.
Thanks to everybody who helped,
Hope this will help anyone in the future as well.
EDIT:
One more thing I've noticed is every time I edit my custom workflow, it regenerates the xaml and removes the ";assembly=BuildTasks" suffix from the custom CodeActivity namespace (xmlns).
So after every change I need to edit the xaml to fix it over and over again, otherwise the same error reoccurres.
You have to decorate your class with the BuildActivity attribute. See http://www.ewaldhofman.nl/post/2010/05/27/Customize-Team-Build-2010-e28093-Part-7-How-is-the-custom-assembly-found.aspx at the bottom. There is an UPDATE section with more information.
Where is assembly of your CustomActivity? You must add this assembly to source control and introduce it to the Build Controller you are using. For this:
Right click on Builds node.
Select Manage build controllers.
Click properties.
In the "Version control path to custom assemblies" section, introduce your assembly.
I had this exact same problem. The reason was that I had compiled the library with the custom activities against the x86 platform and the Build Controller was running off of a 64-bit Windows 2008 VM. Switching the target platform to AnyCPU allowed the build controller to immediately utilize the library without having to add it to the GAC.
The problem may be related to the output dll being in TFS.
What could happen is the following:
TFS does a get latest
The output dll is fetched and is read only
TFS tries to build
The build tries to write to the dll
Since the dll is read only you get an exception