In my WPF-application, targeting .NET Core 3.1, I'm trying to use the built-in System.Windows.Controls.BoolToVisibilityConverter
I think I have looked up the correct syntax for the XAML reference.
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
However I get a compile error:
'System.Windows.Controls' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.
What can be the problem?
If you look at the documentation here:
https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.booleantovisibilityconverter?view=netcore-3.1
It's not in the dll you're using.
Namespace:
System.Windows.Controls
Assembly:
PresentationFramework.dll
Change the assembly.
Title="MainWindow" Height="450" Width="800"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
>
<Window.Resources>
<controls:BooleanToVisibilityConverter x:Key="boolConv"/>
</Window.Resources>
Related
Eclipse CDT doesn't know about the _Noreturn keyword and shows it as a syntax error.
A suggested workaround is to add an empty preprocessor macro entry to the CDT User Setting Entries, but apparently this has to be done in the project settings for every single project.
Is there a way to fix this globally for all projects, other than hiding all syntax errors completely? "CDT User Setting Entries" shows up in the global preferences under C/C++ > Build > Settings, but apparently cannot be edited there. (using Eclipse Oxygen.3a / 4.7.3a)
On the mentioned preference page, you could edit the "Built-in Compiler Settings" provider's "Command to to get compiler specs" to add -D_Noreturn="".
Then, as long as your projects are configured to use the global "Built-in Compiler Settings" provider ("Use global provider shared between projects" checked in Project Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Providers tab -> Built-in Compiler Settings provider), they will pick up this macro definition.
You could also consider contributing a fix to add propert support for _Noreturn to CDT.
I'm trying to open one of my older projects, that was built using iOS 6.0. The project used to compile fine, but when opened under xCode 5, I get this cryptic error message.
Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architecture 'armv7'
Unable to determine concrete GCC compiler for file /Users/alexanderstone/Desktop/Development/RestKit/Vendor/NXJSON/NSError+Extensions.m of type sourcecode.c.objc.
Unable to determine concrete GCC compiler for file /Users/alexanderstone/Desktop/Development/RestKit/Vendor/NXJSON/NXDebug.m of type sourcecode.c.objc.
Unable to determine concrete GCC compiler for file /Users/alexanderstone/Desktop/Development/RestKit/Vendor/NXJSON/NXJsonParser.m of type sourcecode.c.objc.
Unable to determine concrete GCC compiler for file /Users/alexanderstone/Desktop/Development/RestKit/Vendor/NXJSON/NXJsonSerializer.m of type sourcecode.c.objc.
I've checked both project build settings, and they appear correct - LLVM 5.0 is selected as compiler for both.
Additionally, I checked the .m files that compiler complains about, and do not see any reference to GCC there. There are some ASSERT() and other macros, but I don't know if they are compiler-specific.
How can I resolve the llvmgcc4.2 compiler missing in xCode 5, when all subprojects appear to be set to llvm5.0?
Found this similar question. For me the solution was to go to Editor>Validate Project settings for both the child and the Restkit projects.
One solution of this problem is that i have resolved when i was facing this issue is just go to Build Settings-> Build Options-> Compiler for c++ set to Default and your problem wil be solved. see attached
Additionally, for opening in XCode 7 and for architecture 'i386', setting the compiler to 'Default compiler (Apple LLVM 7.1)' is one solution.
Hello I'm getting into Winsock programming in C. I believe that in order for me to access the (or any other header related to Winsock for that matter) header file I have to have Visual C++ 2010 installed and set it as my default compiler. So I download it, and in CodeBlocks I set it to my compiler. I run some Winsock code and I get this message:
C:\Users\Jared\Documents\Test.c|6|fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory|
I also get this message for including 'winsock.h' and 'windows.h'. This has something to do with the Visual C++ compiler. I try installing Visual C++ 2008 and use it as my compiler and get the same message. I then read that I have to install microsoft's SDK. I download and install it and it gets an error saying that I can't install it (this is the .Net framework 4.0 version). I then try the 3.5 version and it installs fine but my compiler still can't find the header files. I have the .net framework 4.0 so I don't see the problem. I also read that I have to include some header files in Visual C++ by going to Tools>Options>Projects and Solutions>VC++ Directories and I get the following message:
"VC++ Directory editing in tools > options has been deprecated."
Visual C++ 2010 no longer supports this feature. Does anyone have a solution or can help me with this?
Long story short: I cannot include 'winsock.h', 'winsock2.h', or 'windows.h' using the Visual C++ 2010 compiler.
All help is appreciated.
In Visual C++ 2010 it is recommended to use property sheets instead of this kind of global directory settings editing. You need to edit the user settings property sheet (probably Microsoft.Cpp.Win32.user.props) in your AppData folder. You can do it in the UI through the Property Manager via View->Property Manager and browsing for that sheet.
However, I think you should have $(WindowsSdkDir)include in Include Directories if you have it installed correctly.
I installed the .net 4.5 framework, but Visual Studio gives the following error
error CS0246: The type or namespace name 'INotifyDataErrorInfo' could not be found (are you missing a using directive or an assembly reference?)
I modified the project reference paths to the following
C:\Program Files\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\
C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\
but then I get the error
error MC1000: Unknown build error, 'Could not load type 'System.ComponentModel.TypeConverter' from assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Has anyone encountered or resolved this issue before?
Since .NET 4.5 is still in beta, I think it's only officially supported in the VS11 Developer Preview, not in VS2010.
I am building a SL3 + RIA application in VS2008. When compiled the application in debug mode it compiles fine with out any error, but when I compile the same application with out any code change in release mode I get an error
'The type of namespace name 'BusyIndicator' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference).
All the errors are coming from the generated code name.g.cs
Just curious anyone run into this problem.
This still happens when you do a Clean and/or Rebuild?
I've seen odd issues with the *.g.cs files, try just adjusting something immaterial in the xaml to force the re-creation of the *.g.cs file.