datagrid crushes ExpressionBlend 4 - datagrid

If I try to add a DataGrid, the Blend 4 crashes.
If I open a project, that has Datagrid (that was added in VS2010), the Blend can't open it in the designer, but give an error:
The name DataGrid does not exist in the namespace "http//schemas.microsoft.com/winfx//xaml/presentation/sdk
Interestingly everything worked well before, and I can't imagine what happened.
The error emerged after Windows update, but persists despite that I reverted to the previous installation state. I reinstalled the Blend4 with sp1, but nothing changed.
Does anybody else experienced similar issue?
Thanks in advance
Gabor

What I did:
I unblocked the silverlight_sdk.exe file (in propeties), and then reinstalled.
Interestingly only schema mappings didn't work.
If I changed the
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
declaration to concrete namespace and assembly:
xmlns:sdk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
(as was in SL3), the DataGrid showed up in the designer as before, but in that case I have to add all other assemblies in the sdk manually.
Gabor

Related

BC30002 Type 'abcdefg' is not defined Error when building VS 2017

I have a project that is coming up with 5 BC30002 errors, type 'typename' is not defined. However, when I double-click the error to open the offending line of code, intellisence does not show the line as an error, and in fact, when I clear out the name and re-type, intellisence finds the type for me.
One thing I have noticed is that the referenced library in question appears correctly if I remove it and add it back in. It shows the version number of the DLL and "Copy Local" is showing as "True". After I build the project, I then see the version number as 0.0.0.0 and local path is set to "False" (see below). I think this is the root of the problem as it seems that during the build process, it loses track of this DLL.
Any ideas on what might be causing this?
Have you tried deleting your VS folder?
A bit late of a reply but I just had the same issue and resolved it by updating the NuGet packages for the typename. For some I had to then downgrade the packages to their original version (some things were no longer working/present in the newer versions) but in the end the solution build and compiled just fine.

Visual studio: Can and cannot access a namespace

I'm getting a strange warning when hovering over an OracleConnection object in visual studio. It doesn't seem to stop my website from working fine, but the warning bugs me.
It seems that the class and Oracle.DataAcces.Client namespace is both visible and not visible to my project at the same time.
Here are some pictures:
I have no idea what is causing this; I already have the Oracle.DataAcces reference in my project references. What I suspect that is happening is a bug that would cause my project name to interfere with my namespace, but that doesn't seem to be it.
I tried changing my namespace name and project name to different things, and I still get the same result.
And for some reason the project shows up twice in the navigation bar:
Did you check if the version of the Debugger matched with the version of the Oracle.DataAcces.Client library? That is, for e.g., if you're using x64 bit version Debugger then you should make sure the dll file is also x64. I was having trouble accessing this reference today, and this fixed it. Hope this helps!
Update
After some research, usage of the scientific method and throwing things are rotating blades and seeing what sticks this is what I think might be happening, and I think I found a "solution/workaround" to it.
It appears as Visual Studio is trying to add some temporary DLL/reference to a temporary DLL/project containing all the namespaces that aren't my Web Application's Directory.
Here is what makes me think that this is happening:
When opening the Object Browser Ctrl + Alt + J, There are multiple instances of the projectX Project. Using Dot peek I determined that one of them was the compiled version of my project and the other is some weird project without the main namespace (projectX):
Cleaning the project sometimes work, but the best solution so far has been to go into the solution and files delete the bin and obj folder from my project folder and restart visual studio.
Only using the projectX namespace with no sub-namespaces doesn't fix the problem all. The additional projectX instance in the object browser contains the same thing as the normal one, minus the files and web page objects in my main directory.
So here is my solution:
Create a class library in the solution and put all your classes in it. Then move the references that your class needs to your new class library. Finally, add a project reference to the Web Application pointing to the class library.
It looks like I manage to find a fix but, but I'm going to have to try it for longer to make sure of it.
Follow up
It appears that the solution I found works very well and won't cause the problem to happen again, therefore I recommend it.

Namespace no longer recognized after package update

I've got a multi-project solution (VS2013 Express) and like an idiot I assumed that running update-package would only update the packages in the current project.
This caused all kinds of nastiness, the majority of which I've worked through and resolved. I'm now left with the following the MVC project and I'm stuck:
the Default Namespace is no longer recognised in the IDE
I have lost Intellisense in the project
the Refactor options are not available
SimpleMembershipInitializer has red squiggles indicating it can't
be found
However the solution builds and appears to work without issue - I'd appreciate some pointers as to where to look to clear the above.
I found a solution in this instance, it has happened a few times since and simply unloading the project and reloading it has resolved the issue every time

TFS 2010 - TF14040 The Folder may not be checked out

I have a .NET 4 website in VS2010 stored in a TFS 2010 team project. I need to add a reference to System.Data.Linq.dll to the website. I am referencing a LINQ DataContext that is defined in another project and I get build errors saying that I need the reference to System.Data.Linq. I go up to the "Add Reference" menu option and add it like I would any normal reference, and it even shows up in the Web.config and in the Properties pages for the website... BUT if I build I still get the same error.
So I found a place in my code where I was referencing the LINQ count function and it told me it was invalid because I was missing a reference and it offered to add the reference automatically. I told it to add the reference automatically and it is at this point that I get the error mentioned in the subject:
TF14040: The folder $/Folder/Subfolder may not be checked out. No items were checked out
I've done some research online but I haven't been able to find much. I saw on a blog that making the folder not readonly fixed the issue for him, but it didn't seem to work for me unless I misunderstood something.
I tried loading up the project from source control onto a fresh computer where that project had never been loaded before and I can reproduce the issue the same way. Help would be greatly appreciated.
FWIW, this error also occurs in different circumstances. I had the same error today from the command line when trying to use tfs checkout SomeFolder /login:user,password, although this was not within the context of an asp.net app, I'm currently working on dependency replication. For me, adding the /recursive command worked, like this:
tfs checkout SomeFolder /recursive /login:user,password
The hint to try that came from here, by the way.
I have no idea if this is your problem but I've noticed that TFS2010 seems to have some bug somewhere around folder renames/deletes/changes or something. The bugs seem to go away when you check everything in and try again after the folder change has been saved to source control. I have hit this issue a dozen times this week but don't know exactly what the scenarios are. It's quite frustrating.
I figured it out, but it's a little strange. I had some build errors that I hadn't fixed yet, also my web.config file used to be for a 3.5 SP1 site and I upgraded the site to 4.0. Somewhere along the line the build errors and the web.config combined to form this strange weird error that apparently has nothing to do with TFS.
I figured it out by creating a new website and slowly moving over portions of my site to that new site. Things didn't go totally crazy until I moved over my web.config. So I went back and updated my web.config file so that it more closely matched the way a .Net 4 web.config should by trimming out a lot of stuff and now things are good and building fine. Thanks for the help.

ASP.NET website does not rebuild

I have a solution with several projects in Visual 2008, let's say SuggestionProcessor (a class library) and Suggestions (a website) with a webhandler GetSuggestions.ashx. I changed a method in SuggestionProcessor which is used in the webhandler. The call in the webhandler has been adjusted to the changed method.
But now when I try to execute the webhandler after a rebuild I get an error that the method I changed is missing, displaying the old method signature. When I try to rebuild the entire project it seems that the website does not rebuild properly and the code I changed in the webhandler does not seem to be included in the rebuild. I made sure that the website is last in the build order.
What I tried is remove the dlls that the build process should rebuild from the bin folder (not the ones referenced from outside the website). When rebuilding I now get a: 'could not load type Suggestions.global'. Duh, that is what the build process should create. What is going wrong here?
I solved this one by reverting to a previous state when it still worked.
Thanks for the suggestions, I'm sorry they didn't work in my situation.
Shall I delete this question now that it doesn't really have a clear use for someone else?
I would check your web.config file, there may be references there that are causing the error since they are missing.
Maybe try and right click on your solution and select "Clean solution" and then try and rebuild all.
If that doesn't work, check your solutions build configuration and make sure all your projects are getting built
Try "Clean Solution", then building SuggestionProcessor, and after that clean and rebuild the web solution.
Visual Studio creates a copy of all your DLLs and sometimes this copies are not refreshed.
Just execute iisreset and delete all folders in:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\
Of course change windows installation folder and framework folder to your version!
I don't think so... I've seen similar issues in Visual Studio 2008 working on web projects where the build and rebuild would fail time after time. I knew that my changes shouldn't have affected the build so I just kept cleaning and building each of the individual projects in my solution until finally (and I do mean finally as in, it took up to 10 builds) my web project would build correctly. I have no idea why, but it feels like some sort of caching issue.
From my answer at "Could not load type [Namespace].Global" causing me grief:
It seems that VS 2008 does not always add the .asax(.cs) files correctly by default.
In this case, refreshing, rebuilding, removing and re-adding, etc. etc. will not fix the problem. Instead:
Check the Build Action of Global.asax.cs. It should be set to Compile.
In Solution Explorer, Right-click Global.asax.cs and go to Properties. In the Properties pane, set the Build Action (while not debugging).

Resources