I added a Resource Dictionary named ResourceDictionary1 to my silverlight project.
I also added a Silverlight Class Library to my project named OtherAssembly, then in this new assembly I added a new Resource Dictionary named ResourceDictionary2:
In my original project I'm trying to merge both dictionaries in MainPage.xaml:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="MyResourceDictionary1.xaml" />
<ResourceDictionary Source="/OtherAssembly;component/MyResourceDictionary2.xaml" />
</ResourceDictionary.MergedDictionaries>
When I run the project the line with OtherAssembly throws an exception, saying that there's an error assigning the property System.Windows.ResourceDictionary.Source in that line:
But at design time, the designer shows everything in order, it finds all the resources.
I don't know, It seems that the Pack Uri syntax is not well formed.
Anybody knows why I get this error message?
I found the answer.
I needed to add a reference to OtherAssembly, as the error is not detected until run time, it's hard to detect it.
Related
Can I somehow use the same Eclipse plug-in project for both a generated EMF model and the corresponding generated EMF Edit code?
Normally these two components reside in two different projects, the EMF Edit one with the suffix .edit to its name. I find this superfluous, since there is so little code in the Edit project, and it is so closely related to the model code.
I have tried setting both the modelDirectory and the editDirectory Gen Model attributes to (different) directories in the same project, but that seems to lead to endless confusion and build problems. I think maybe the two generation steps overwrite each others project setting files.
After some more experimentation it seems like it works fine to have EMF and EMF Edit generated code in the same project.
The things I had to do to make it work are the following:
Setting the genmodel property modelDirectory and editDirectory to the same directory. Otherwise I got a build error saying "The type ... is already defined in ...".
Setting the genmodel property bundleManifest="false". Otherwise the plug-in ID is overwritten by the generation process.
Apart from this I also set updateClasspath="false" to avoid that the generation process messes around with that.
The automatic updates to the manifest and plugin.xml files seem to be the following:
Set plug-in ID
Add exported packages
Add EMF extensions to plugin.xml
2 and 3 needs to be performed manually if they are desired. That would involve adding entries to plugin.xml similar to these:
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- #generated model -->
<package
uri="somePackage"
class="somePackage.SomePackage"
genModel="model/model.xcore"/>
</extension>
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- #generated model -->
<factory
uri="somePackage"
class="somePackage.someClass"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
I ran into this issue recently - when I try to replace the Wix Product version number using NANT XMLPOKE task, it returns the following error message "No matching nodes found".
<xmlpoke file="..\Setup\abc.wxs" xpath="//Wix/Product[#Version]" value="${version.label}" >
Initially I thought that this was an issue with XPATH statement that I wrote. So I kept trying with different XPATH (like \Wix) and I kept getting the same message back.
Understood from a blog that this is happening due to the namespace definition with the WiX element. Please find below the solution, in case someone doesn't find the blog.
The issue happens because of the namespace definition within the Wix element. You have to add the below changes to get the XMLPOKE working:
<xmlpoke file="..\Setup\abc.wxs" xpath="//wx:Wix/wx:Product/#Version" value="${version.label}" >
<namespaces>
<namespace prefix="wx" uri="http://schemas.microsoft.com/wix/2006/wi" />
</namespaces>
</xmlpoke>
Reference: Soledad Pano's blog
I'm trying out type providers in F#. I've had some success using the WsdlService provider in the following fashion:
type ec2 = WsdlService<"http://s3.amazonaws.com/ec2-downloads/ec2.wsdl">
but when I download that wsdl, rename it to .wsdlschema and supply it as a local schema according to the method specified in this example:
type ec2 = WsdlService< ServiceUri="N/A", ForceUpdate = false,
LocalSchemaFile = """C:\ec2.wsdlschema""">
Visual Studio emits an error message:
The type provider
'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders'
reported an error: Error: No valid input files specified. Specify
either metadata documents or assembly files
This message is wrong, since the file quite plainly is valid, as the previous example proves.
I've considered permissions issues, and I've repeated the same example from my user folder, making sure to grant full control to all users in both cases, as well as running VS as administrator.
Why does the F# compiler think the file isn't valid?
edit #1: I have confirmed that doing the same thing doesn't work for http://gis1.usgs.gov/arcgis/services/gap/GAP_Land_Cover_NVC_Class_Landuse/MapServer?wsdl either (a USGS vegetation-related API) whereas referencing the wsdl online works fine.
Hmmm, it appears that the type provider is rather stubborn and inflexible in that it requires a true "wsdlschema" doc when using the LocalSchemaFile option. A wsdlschema document can contain multiple .wsdl and .xsd files within it, wrapped in some XML to keep them separate. I'm guessing this is some kind of standard thing in the Microsoft toolchain, but perhaps others (e.g. Amazon) don't expose stuff like this.
The first thing the TP attempts to do is unpack the wsdlschema file into its separate parts, and sadly it does the wrong thing if in fact there is no unpacking to be done. Then, when it tries to point svcutil.exe at the unpacked schema files to do the codegen, this dies with the error message you are seeing.
Workaround: Add the expected bits of XML into your file, and it will work.
<?xml version="1.0" encoding="utf-8"?>
<ServiceMetadataFiles>
<ServiceMetadataFile name="ec2.wsdl">
[body of your WSDL goes here]
</ServiceMetadataFile>
</ServiceMetadataFiles>
A long time ago I first setup a website in Umbraco. This seemed to be working fine.
I have now come back to it about a year later, and was initially getting the following error when selecting a Document Type (any document type in the Settings tab):
A bit weird, because earlier I didn't have this issue, but fine. I do what it says, and add <identity impersonate="true"/> to the <system.web> node in web.config.
While it does fix the initial issue, I now have the following on all document types:
When trying to create a new Document Type, I get the same kind of error, but then the ReturnUrl part is ReturnUrl=/umbraco/create.aspx?nodeId=init&nodeType=inittemplates&nodeName=Templates&rnd=20.2&rndo=21.2&nodeId=init&nodeType=inittemplates&nodeName=Templates&rnd=20.2&rndo=21.2' - but only if I tick the box 'Create template for this item'. The same happens when I try and create a Template.
After Googleing I came up with this: our.umbraco post with similar issue. One (unconfirmed) solution is that there's an illegal name in a document type/ template - but I haven't changed anything, and might be fixed by going into the database.
I did check the /masterpages folder, the only 'strange' characters in there are - and _.
In my Document Types I have on named 'Textpage (Two col)' and another named 'News & Events list'. I'm a bit hesitant to just delete them, since I don't have enough Umbraco knoledge to be sure this will fix my issue...
Is there any known solution for this, or will I also have to go into the database (and if so, whereabouts?)
I'm running Umbraco 4.7.2, assembly version 1.0.4500.21031.
I've hosted this site with GoDaddy.com - I don't know if that would be relevant.
[Update 1]
As per Tom Maton's comment:
The requirepermissions should be set to false, and have been.
in Appsettings I've set this:
<add key="umbracoUseMediumTrust" value="true" />
And I've added Trusted_Connection=yes to the connectionstring.
the problem remains.
[Update 2]
Tried the solution amelvin provided, but no dice. Doctypes and templates still give the error. I'm getting more certain it's some security issues. Which folder would correspond to the Templates? Would that be the masterpages folder? If so, what kind of permissions does that one need?
It could be that you don't have full trust on your Go Daddy environment?
Check this post out http://our.umbraco.org/forum/getting-started/installing-umbraco/17856-Umbraco-on-GoDaddy-Shared-Hosting
Could help resolve your issue.
The error could be a knock on from permissions errors as yet unsolved.
But the error is thrown if the content page does not have a template assigned or if Umbraco thinks it doesn't have a template. If absolutely nothing has changed to the site then it could be that the umbraco.config file has somehow got corrupted (it will contain all the doctype/template cross reference info). This can be fixed by right clicking on the top 'content' node and choose 'republish entire website'.
Secondly navigate to the settings | document types (if you can now) and check the templates dropdown on the first tab of the appropriate document type. If its set to 'please select' then this error will get thrown when any page tries to render without a valid template assigned. If a default template is assigned - then go to that template and re-publish it - Umbraco may have lost it.
If this does not work then check if the template is assigned properly. Go to the same place in the content tree as the problem page and try to add a node with the desired doctype. If no choices are offered then it could be that the parent tab no longer allows the correct doctypes as children nodes, so go back to the doctypes and check the allowed children (second tab) of the parent node.
If none of this works without odd errors being thrown then its a mystery!
Here are a list of Permissions required for Umbraco http://our.umbraco.org/wiki/reference/files-and-folders/permissions
Or you could use one of the steps below to check all the folder permissions.
http://our.umbraco.org/wiki/reference/files-and-folders/permissions/perform-permissions-check
Or install this package. http://our.umbraco.org/projects/backoffice-extensions/ugolive this will allow you to check the permissions are correctly setup.
This code:
<cfimage action="info" structName="imageInfo" source="#imagePath#">
is giving this error:
The attribute 'structName' is required for the tag. (Found:
[source, structname, action])
When I run this code in CFBuilder - everything is OK, but I must use CFEclipse.
What should I do (I use CF9)?
Thank you for your answers!
Of course this problem won't prevent you from running your application on ColdFusion. It is just an IDE warning that something is wrong.
You have a few options.
Try using a lowercase N in structName. i.e. structname. ColdFusion is not case-sensitive, but Java is, and CFEclipse is a Java application.
If that does not work, then it probably means that the dictionary file that drives the code assist is not correct. You can go earch forthose XML files and update them to include that attribute.
You can use CFBuilder. I know you said you can't, but I have to question why. You know there is a free version that is just as good as CFEclipse, right?
The problem is that there's a casing glitch in that file Peter mentions. There's one reference to "structName" to define the attribute itself, and another "structname" which is in the list defining which attributes are needed for action="info". If you make them both the same, then restart Eclipse, you should be OK (that's I've needed to do to make the error indicator go away).