I have a .Net Framework 4 Web Project which works properly before I add a webservice into it. Then I created a Web Form with Master Page but I can't see the asp:Content section in the Design Mode. There was no available Standard toolbox items in the toolbox as you can see in the picture: Image1 (Can't add images because of lack of reputation)
Then I tried a create a fresh new Web Form for getting rid of and master page related errors but Standard toolbox items were not visible again.
Things I've tried so far:
Removed the web service
Undo pending changes
Created a new web form which don't use a master page
Created a fresh web project
Resetted settings via Tools > Import and Export Settings
Resetted via command line devenv /ResetSettings, devenv /ResetSkipPkgs
Repaired Visual Studio via installation .iso
UPDATE 1 I've also tried to add a label from source view as mentioned in this
question. When I switched to design mode it throwed an error: "Error creating control" Image2
I think this is a project related problem but I'm not sure. The weird thing is some of the old items like an ascx control allow me to add Standard toolbox items but nothing newly created items are allowed me to do this. How can i resolve this issue?
Thanks in advance,
After a long time googling , and mostly all answers - revolving around
Reset Toolbar
Delete .tbd files from C:\Users(your user)\AppData\Local\Microsoft\VisualStudio\11.0
Using devenv.exe /SafeMode & devenv.exe /ResetSettings.
None of them working out for me, making me more sick.
There is something I did which worked and thought it's worth sharing if it helps someone.
I followed all of the above steps, failing . I did Step 1 & 2 with my project (in VS 2012) open and
Right Click on Toolbox > Choose Items > Pressed Reset > ok.
Then again, Right Click on Toolbox > Add Tab > 'gave it some name' > then again
Reset Toolbox
There was some screen flash/flickering - some loading .
And to my surprise the Grey life ( grey controls ) were now available .
Hope this helps someone like me! :)
in the image, the General tab is open, not the HTML tab. try clicking the HTML tab.
1 - Right click – your web application project and select Properties -> Web
2- in the server section choose Use IIS Web Server -> then click Create Virtual.
3- Clean your project from any DDLs that was previously complied and compile your project again.
ALSO
http://support.microsoft.com/kb/2933779/en
Related
I have a Strange issue that I can't seem to fix, my Intellisense for XAML is no longer showing up and the code behind is only showing the premade Members. The Classes and Methods I have made are not showing up. Also Visual Studios is not recognizing other pages and wont recognize Navigation either.
I have tried going to Tools>Text Editor>C#>Intellisense -Statement completion and checking the boxes Auto list members and Parameter information. I also tried to clear out the cache.
From what I have researched it seems nobody else is having the same problems.
Close all open tabs in the project and quit VS, reopen the solution in VS and right click the XAML file in the Solution Explorer and then select Open With….> Source Code (Text) Editor.
Delete obj folder and clean project
Right click the XAML page>Properties>Build Action>change it to something else and back
Add a new content page under this specific project and check it works or not.
I would like to add that this worked for my .cs files only.
To get the XAML files Intellisense to work try to repeat the above steps on your .cs files or wait for the XAML files to gain Intellisense.
For ReSharper users: I found that having ReSharper's IntelliSense enabled for all languages can break Intellisense unexpectedly (especially for XAML files). Here's how I was able to fix the same problem that the asker had in Visual Studio 2017 with ReSharper installed:
In Visual Studio, go to the ReSharper menu and click on Options.
On the left side go to Environment > IntelliSense > General.
Select the Custom IntelliSense radio button.
Change any languages that have broken IntelliSense to Visual Studio (like XAML).
Click the Save button.
Just Exclude and Include Xaml Pages and It works again.
I solve that by changing the default editor in visual studio :
In Visual : File > Open
In the open file box : Select a .xaml file (don't open it)
Select "Open with" in the button arrow
Select "Source Code (Text) Editor and Set as Default
Click OK
I tried most of the above without much luck, but noticed if I created a new page, then intellisense worked as expected. For the properties section of the xaml file I noticed that the new page had a Custom Tool assigned (MSBuild:UpdateDesignTimeXaml) do I tried to cut-and-paste this into the existing forms without luck.
Looking at the .cs page for the new page that worked I notice that there is some extra info above the partial class [XamlCompilation(XamlCompilationOptions.Compile)] so I added this along with a using Xamarin.Forms.Xaml statement.
Finally I went back to the xaml properties page and selected Reset to Default for the Custom tool. Voila, for me everything started behaving itself.
Please add the following Nuget Package from Nuget Console.
Install-Package MobileEssentials.FormsIntellisense -Version 0.1.1-pre
You can download the latest update from the following link.
https://www.nuget.org/packages/MobileEssentials.FormsIntellisense/0.1.1-pre
After installing the package please restart the project and wait for sometime and check it.
Just delete .vs directory. this directory is hidden. so
Just Exclude and Include Xaml Pages worked for me too. The difference in .csproj file was:
MSBuild:Compile
now:
XamlIntelliSenseFileGenerator
I could fix the issue in VS2019 by launching the VS installer to modify it, un-check and check the workload ‘.NET desktop development’ to re-install it.
I want to insert a textbox into a window form so I chose FastColoredTextbox(this). It's a user-control which can be used to make a textblock component that's very similar to the one in a text editor.
I've been trying to get it to work and have done everything I could with my limited knowledge (started winforms a few days ago)
After installing the NuGet package, I tried getting it to work but I am not even able to start. I need help getting started.
I checked if it had the relevant assembly reference and it did.
I expected a component like a button/label to appear in my toolbox which I could drag into my designer but it didn't, so I tried rebuilding and changed settings to see if it appeared in the toolbox as given here. I didn't see anything in the toolbox that I could drag and drop.
I downloaded a sample project and went through the code. The designer.cs file had the variable and code for the textbox. I modified and pasted it into my designer.cs file thinking that it would appear in my designer. Visual Studio gave me a warning that the changes I make in the designer appear here and I shouldn't directly edit it.
There's no documentation to display the textbox. There's documentation for syntax highlighting, code folding etc.
I tried googling "how to use custom user-components" and I got links detialing the process of making a custom component.
If you need anymore details please let me know.
Help is greatly appreciated :)
Since you are using a nuget package (Install-Package FCTB), the control is in this dll:
Solution Directory → packages → FCTB.2.16.11.0 → lib → FastColoredTextBox.dll
You can add the control to Toolbox and drop in on the form and simply assign some text to Text property of control.
To add the control to toolbox, just right click on a group in Toolbox and click Choose Items ..., then from .NET Framework Components tab use Browse... button to choose FastColoredTextBox.dll from this path:
Solution Directory → packages → FCTB.2.16.11.0 → lib → FastColoredTextBox.dll
After choosing the dll, press OK to add FastColoredTextBox control to the toolbox. Then simply drop an instance on form and in code, assign a text to it's Text property:
this.fastColoredTextBox1.Text = "Some Text";
In building an installer for my application,i repeatedly getting an error:
Error -3204: Cannot extract icon with index 0 from file C:\Users\....
A quick google search got me here (where the issue isn't resolved) and following step by step procedure here enabled me to add C:\Windows\system32\shell32.dll everytime i build my project, then selecting icon:2 .A setup.exe is created despite an error
and installs app for me but with no trace in Add/Remove programs in Control Panel.
How to get that icon in Add/Remove Add/Remove programs in Control Panel.
EDIT: if there's any other software for windows installer for VS2013 such as SetupProject with the previous releases of VS 2xxx please suggest me
You should change the method of creating the setup file. See the link below :
Clike Here
Update :
Here are two other setup applications which can make setup of your application.
QSetup
and Centurion Setup
You can try them to make setup for your application.
<ISProductFolder>\redist\Language Independent\OS Independent\setupicon.ico
When I used the file path above in the project assistant --> application shortcuts section --> use alternate shortcut icon, the basic icon showed up and allowed me to select the icon. Now my project builds without this error. (the icon looks bad but it works.....)
IconShow
I had created a basic application using Visual studio 2010. To modify the existing look and for improving GUI, I tried browsing for templates and found Codeplex. And then downloaded an exe & installed it.
No clue regarding what should be done after that! checked out the visual studio project settings. Nothing regarding templates.
I am new to WPF. Any ideas how to proceed ? There are many articles around stating that the themes can be found in codeplex but none about how 2 use it.
Do you mean the WPF Themes?
Please check the link
http://wpf.codeplex.com/wikipage?title=WPF%20Themes
OK Guys, Lets take this one step at a time. After crunching hours, I did apply the Codeplex template to my project.
(This may sound simple for others.(anyways for the sake of beginners like me!)
First,
1) Right click the references tab (found under the solution explorer of your project).
2) Click "Add Reference" and navigate to the 'Browse' tab and choose WPFToolkit.dll
3) This is the trickiest part. For this, download the WPFToolKit.msi from codeplex 1 Link.
4) You will need .net 3.5 sp1 framework for this.Refer to my answer at 1 Warning here
5) After successful installation, you will be shown nothing except the installation status.
6) So now, for the WPFTookKit.dll browse your program files. For me, it was found in "C:\Program Files\WPF Toolkit\v3.5.50211.1"
7) After this has been done, follow the next step of adding the xaml file to your project.
8) As Oleg said, right-click on the project in the Solution Explorer, choose Add --> Existing File and select the appropriate .xaml file (In my case I used a expression dark template from here )
9)Now double click the App.XAML file and under add the following entry [] without '[' and ']'.
10) Refresh MAINWINDOW.XAML and by this time, your theme should have been applied.
I made a usercontrol in my project, and after building project, I need to put it in my toolbox, and use it as a common control. but i can't. the UserControl is in my project namespace, and I tried Choose Item in right click menu, but I didn't find a way to add it.
I had problems getting them to add automatically to the toolbox as in VS2008/2005.
There's actually an option to stop the toolbox auto-populating!
Go to Tools > Options > Windows Forms Designer > General
At the bottom of the list, you'll find Toolbox > AutoToolboxPopulate which on a fresh install defaults to False. Set it true and then rebuild your solution.
Hey presto, the user controls in your solution should be automatically added to the toolbox.
You might have to reload the solution as well.
Right-click on toolbar then click on "choose item" in context menu. A dialog with registered components pops up. in this dialog click "Browse" to select your assembly with the usercontrol you want to use.
PS.
This assembly should be registered before.
I found that the user control must have a parameterless constructor or it won't show up in the list. at least that was true in vs2005.
Using VS 2010:
Let's say you have a Windows.Forms project. You add a UserControl (say MyControl) to the project, and design it all up. Now you want to add it to your toolbox.
As soon as the project is successfully built once, it will appear in your Framework Components. Right click the Toolbox to get the context menu, select "Choose Items...", and browse to the name of your control (MyControl) under the ".NET Framework Components" tab.
Advantage over using dlls: you can edit the controls in the same project as your form, and the form will build with the new controls. However, the control will only be avilable to this project.
Note: If the control has build errors, resolve them before moving on to the containing forms, or the designer has a heart attack.
I had many users controls but one refused to show in the Toolbox, even though I rebuilt the solution and it was checked in the Choose Items... dialog.
Solution:
From Solution Explorer I Right-Clicked the offending user control file and selected Exclude From Project
Rebuild the solution
Right-Click the user control and select Include in Project (assuming you have the Show All Files enabled in the Solution Explorer)
Note this also requires you have the AutoToolboxPopulate option enabled. As #DaveF answer suggests.
Alternate Solution: I'm not sure if this works, and I couldn't try it since I already resolved my issue, but if you unchecked the user control from the Choose Items... dialog, hit OK, then opened it back up and checked the user control. That might also work.
There are a couple of ways.
In your original Project, choose File|Export template
Then select ItemTemplate and follow the wizard.
Move your UserControl to a separate ClassLibrary (and fix namespaces etc).
Add a ref to the classlibrary from Projects that need it. Don't bother with the GAC or anything, just the DLL file.
I would not advice putting a UserControl in the normal ToolBox, but it can be done. See the answer from #Arseny
In my case, I couldn't see any of the controls in the project. Only when right clicking on toolBox and selecting "Show All" I saw them, but yet they were disabled...
Changing Project type from Windows application to ClassLibrary made the fix.
Basic qustion if you are using generics in your base control.
If yes:
lets say we have control:
public class MyComboDropDown : ComboDropDownComon<MyType>
{
public MyComboDropDown() { }
}
MyComboDropDown will not allow to open designer on it and will be not shown in Toolbox.
Why? Because base control is not already compiled - when MyComboDropDown is complied.
You can modify to this:
public class MyComboDropDown : MyComboDropDownBase
{
public MyComboDropDown() { }
}
public class MyComboDropDownBase : ComboDropDownComon<MyType>
{
}
Than after rebuild, and reset toolbox it should be able to see MyComboDropDown in designer and also in Toolbox
The issue with my designer was 32 vs 64 bit issue. I could add the control to tool box after following the instructions in Cannot add Controls from 64-bit Assemblies to the Toolbox or Use in Designers Within the Visual Studio IDE MS KB article.
Recompiling did the trick for me!
I just had this issue with VS 2022. There may be a quick/easy answer.
My quick and dirty user control would not appear in the toolbox (full rebuild etc.).
I quit the solutiuon and VS, reloaded all, rebuilt and it appeared and worked.