Can't view Application property page - E_FAIL / Method Not Implemented - windows-phone-7

In the Solution Explorer in Visual Studio 2012, I right click on my wp8 project and go Properties, and the Application tab shows:
An error occurred trying to load the page.
Error HRESULT E_FAIL has been returned from a call to a COM component.
or
An error occurred trying to load the page.
The method or operation is not implemented.
Would anyone know how to go about debugging this?
I cannot repro this problem with a fresh project, but haven't been able to nail out where it is failing in my project...
Maybe related to AssemblyInfo.cs? Source file 'Properties\AssemblyInfo.cs' could not be found
BTW it builds and deploys to my device just fine...
Thanks

So after an exhaustive round of brute force elimination, I was able to narrow this down to my use of .java files. Yes it is weird, but it has worked. I have been including .java files in my project and setting their properties to Compile as c#. There were merge reasons for doing so, and I had of course modified the java code slightly to compile, but somehow Visual Studio's property pages spaz out when a .java file is included this way, even though the project compiles just fine. So I wrote a little tool to copy all the .java files to .java.cs and include them that way and everything is fine now!

I found this issue in all of my projects and reasoned it might have had to do with a recent Windows update. I updated VS 2017 to 15.9.15 and that resolved it for me.

Related

DSFML building error (VisualD)

And at first, sorry for my bad English. It is my first project in D. And my first project with SFML (DSFML of course).
I use dub for making Visual Studio project (I use VS2010). Then
open it and set up project settings:
general
compiler
linker
Autocomplete works correctly:
When I try build project, here is error:
Error 42: Symbol Undefined _D5dsfml8graphics12__ModuleInfoZ
How I can resolve it?
This particular error is saying that it can't find the actual D code for the library. It could mean that dub isn't grabbing/linking the source somewhere, but I've never used dub with an IDE so I can't be sure.
My suggestion to help you figure out what is going wrong and to fix this issue is to bug the maintainer (who is me, actually) on github by opening an issue about a lack of tutorials for the IDE's that are available to D right now.
If you want to get started with DSFML right now, however, you can sort of follow along with the command line tutorial and use that as a basis of figuring out what libraries need to be linked in, set up import search paths, etc.
Create project by dub init dsfml_test (where dsfml_test is our project name)
Add libs dependencies to dub.json
Generate Visual Studio project
Open project in Visual Studio
Open project properties
Enter path to directory where is placed dsfml lib files
Thats all. Now can add import dsfml.graphics, dsfml.window, dsfml.system; ...etc and build project.

The Following Module was built either with optimizations enabled or without debug information after frame work is changed to 4.0 from 3.5

I am using VS2010.I was changed my project and its dependent projects .Net Framework to 4.0 from 3.5.Now I could not attach the process,due to this I am not able to debug the code.
I have cleaned all the bin folders and rebuild the projects ,but still I am having following error.
Please help me to resolve this..
I'm not sure what the question is here. The error message clearly tells you that you need to
Turn off (disable) optimizations
Turn on (enable) debug info
Rebuild your project so those changes take effect.
Apparently you only did step #3.
Also see vs2010 debugging module was built without debugging information?, which may provide more information.
I also received this error, and did all the right things as described above - those have been my settings all along anyway. I even went so far as deleting the assembly from the long C:\Users... path in the error message - it still didn't cause that message to go away.
Then I tried putting a breakpoint in the source, which should not be allowed if the module really WAS built without debug information. And then ran the program and it stopped at the break point and I could do all the usual debugging.
So right now I'm just ignoring the message. I could do as suggested and disable the 'Warn if no user code on launch' option as suggested in the message, but I'm not doing that until I can spend some time working out why the message comes up at all.
Uncheck this option in Visual Studio 2012.This would solve this issue

Resharper 7: MSTest not working - "Test wasn't run"

Since I upgraded to VS2012 and Resharper 7, my previously working MS Tests are not running anymore.
The tests are run in an ASP.NET environment. I use the following Attributes:
[TestMethod]
[HostType("ASP.NET")]
[AspNetDevelopmentServerHost("C:\\Projekte\\****\\Website", "/")]
[UrlToTest("http://localhost:7924/")]
Any idea how to fix this?
As odd as it is, using VS2012, using Resharper 8.0, using NUnit, I was receiving this error because of an entry in my app.config file. I added an EntityFramework connection string and this behavior started. Removing the entire connection strings section shows the test runner starts/works again. Viewing output shows the app.config is not valid - this was causing this specific behavior in the test runner - "Test wasn't run".
I had the testproject set to AnyCPU and the project set explicitly to x86 when this happened. Setting the testproject to x86 solved it for me.
I'm using VS2012 R#8 and nUnit
Try running the Unit Tests using the MSTest Test Explorer. You might find more details in the output window of the root cause.
For me, it was a referenced assembly that was using a more recent version of NUnit than the one that was referenced in the test project. Using the same up-to-date version fixed the problem.
System.IO.FileLoadException: Could not load file or assembly 'nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
I'd same problem I just..
Changed methods access modifier from private to public.
Removed static keyword from methods.
That's it. It worked for me. But that is for C#.
In my case it was the NUnitTestAdapter nuget that needed to be removed.
Check that any references that you have in the test project are set to Copy Local True.
I had the same problem. Couldn't get the Visual Studio test runner to work, so I tried debugging a test instead. This threw a ConfigurationErrorsException, which didn't have much of a stack trace but contained the phrase "ClientSettingProvider". I searched my solution and found that something had added a appSetting key for "ClientSettingProvider.ServiceUri" to my app.config. I deleted this (along with an empty connectionStrings element) and rebuild everything - fixed the problem!
Double check your app.config and try deleting any empty elements or anything that looks fishy.
Another (silly) problem it might be; I accidentally had the project set to not build. Go to Build/"Configuration Manager", and ensure the project is set to build.
Using VS2010 and ReSharper 9.1 the issue was that the file LocalTestRun.testrunconfig was missing but was referenced in my .vsmdi file.
The test without VS were running properly but I always had the "Test wasn't run" error in ReSharper test UI.
So I simply restored my old LocalTestRun.testrunconfig file and everything run perfectly.
I probably could have updated my .vsmdi file to not reference the missing file... I did not test that.
On VS2012, Test Project don't work on Shared Folders like \XXXXXX\XXX
I solved it copied the Test Project on local devices.
Good Luck
I found that the settings file for the unit test may need checking as to which one is being pointed to by ReSharper. I had the same thing happening and it was down to my unit tests for the RS Harness pointing to the wrong file.
I had the same issue because the test class name had the characters '<' and '>' in it (also '(' and ')' caused this issue).
Removing those symbols fixed the problem.
I could use symbols in identifiers thanks to F#'s Unicode support.
I had the exact same issue and nothing helped.
eventually I saw that I had a mismatch in my namespaces of the unit project and the unit test project.
The namespace of my unit project is unit.project and the test project was named unit.project.tests but the default namespace of the test was the same as the unit, both was unit.project.
Once I've updated the namespaces to be different (one namespace for each project) everything worked!
I had a similar problem with NUnit test, which would not be executed, but R# would only mark them as "Test wasn't run".
Executing them with the native NUnit runner revealed, that the app.config file had an error (actually, 2 ConnectionString sections). Fixing this also made the tests running in R# test runner.
I kept getting "Test wasn't run" in Resharper.. I tried all the recommendations but nothing worked. What solved it for me was running Visual Studio as Administrator. (VS2013 w/ Resharper 8.1)
Just an excerpt from MSDN regarding
Assert.Inconclusive:
The code generated by Visual Studio when creating unit tests includes
an Inconclusive statement as a placeholder.
It happens if something is wrong with the solution, the most often a misconfiguration, like wrong or mismatched namespaces, inconsistent build targets etc, what leads to the fact that UnitTestExplorer is unable to use provided unit tests properly. So the general solution is to check latest changes and fix errors.
I had the same problem in C#: Unit tests run by ReSharper all just stopped with "Test wasn't run". No other information.
It turned out to be due to my custom section in App.Config. Removing that and it worked.
Configuration: Visual Studio C# 12, ReSharper 8.2.3
It could be also that Your solution contains multiple versions of i.e. nUnit installed in different projects. In my case this was the reason of the problems. After unifying the nUnit version in the solution, the problem was gone.
Just to add to this, I had written over my app.config file with a new one that was missing some sections I needed. I added the sections back in, at which point I got this same error in resharper. Thanks to the comments above I compared it to an older version and found that I was missing the section names in the configSections.

Visual Studio 2010 keeps complaining about Invalid XML although there is none (WP7)

I experience a strange behaviour in Visual Studio 2010 when creating Windows Phone 7 apps. After some time VS starts to complain about Invalid XAML although there is no problem and the app compiles and runs just fine.
It bugges me because I cannot use the visual desingner saying "Exception was thrown on "DataTemplate": Invalid XML" and there is a DataTemplate higlighted in the code. The data template is always ok, VS does not complain about it when copy-pasted to another project.
I found out that problematic are usually the DataTemplates with custom converters or when usin g classes like PhonePerformance.
Sometimes the error is "Exception thrown was due to document error: Invalid XML" and nothing is even highlighted in the XAML file.
I tried reinstalling .NET. Visual Studio etc. and the problem occurs on two separated machines so I do not think it is specific to my configuration. It may be specific to my code.
Anyone experienced similar behaviour?
When using XAML, if you reference a library that needs to be evaluated but can't be at design time you get this kind of error. You can turn off the visual editor and just work in XAML - that will stop the error (and save you time).
You reinstalled .NET and VisualStudio??? You should have just spun up a second instance, opened the solution in both, then attached the debugger from one to the second and opened up the visual editor. It would have told you exactly what in your code was causing the problem. Also DesignerProperties.IsInDesignMode in your converters. Jeez. You wasted so much time :(
As for design time data, that's tricky. Either you have DesignTimeDataWithDesignTimeCreatableTypes that aren't or DesignData that can't create proxies for your real types (for whatever reason, had this issue many times deep in the past).
The only way to figure this out is to debug one instance from another. Its actually not that hard. I do it alot (debugging WF4 ActivityDesigners).
A friend has found a solution and you would not believe where the problem is. This happens if you have a space in the name of your assembly. I found out that I really have a space in assembly name in all the problematic projects, renamed the assemblies and the designer works again.
The solution is also mentioned here http://forums.silverlight.net/t/115011.aspx/1

Problem with Unit Testing Revit 2012 addin in Visual Studio 2010

I am trying to create unit test in VS2010 for Revit addin that I developed.
Problem is when I create unit test for a method and then run that test, I get this message:
Test method TestProject1.SimpleTestCommandTest.ExecuteTest threw exception:
System.IO.FileNotFoundException: Could not load file or assembly 'RevitAPIUI.dll' or one of its dependencies. The specified module could not be found.
RevitAPIUI.dll is properly added to references of Revit addin project, and also in references of test project.
Any idea what should I do to fix this?
You might want to take a look at this blog points Jeremy Tammik posted recently.
http://thebuildingcoder.typepad.com/blog/2013/07/revit-add-in-unit-testing.html
Make sure that CopyLocal is true in the properties of that reference.
NOTE: This is a rehash of my answer to the same question on the Autodesk forums that I'm posting here for SO users that may not look there. Apologies in advance if this is inappropriate.
The Revit API DLLs have dependencies on the Visual C++ Runtime. You need to ensure the VC++ Runtime is loaded into the process. Simply resolving the VC++ DLLs in an AssemblyResolve event handler produces an error that says that the runtime hasn't been loaded properly. I ran out of time and didn't go any further.
I'm also not convinced that unit testing with Revit types would work very well since most of them are tightly coupled to Revit's native code. That is, I don't think you could just new up certain elements to be used reliably in unit tests.

Resources