4

Hi I am receiving an error (No Connection String called "BuildingSettingsEntities" could be found in the application file) on this line of xaml:

 d:DataContext="{d:DesignInstance Type=viewModel:BuilderViewModel, 
 IsDesignTimeCreatable=True}"

However I added this connection string to my app.config as shown below:

<connectionStrings>
<add name="BuildingSettingsEntities" 
connectionString="metadata=res://*/BuildingSettingsModel.csdl|res://*/BuildingSettingsModel.ssdl|res://*/BuildingSettingsModel.msl;
provider=System.Data.SqlClient;
provider connection string=&quot;
data source=mrdk.database.windows.net,1433;
initial catalog=BuildingSettings;
persist security info=True;
user id=test;
password=testingpassword1234;
MultipleActiveResultSets=True;
App=EntityFramework&quot;" 
providerName="System.Data.EntityClient" />

I cannot for the life of me figure out why this is happening so any help would be much appreciated.

Thanks

1 Answer 1

2

It's because you have an s in your connection string name BuildingSettingsEntities in the app.config. The error is pointing out the name as BuildingSettingEntities without an s. If you change it then it should work as expected

Sign up to request clarification or add additional context in comments.

3 Comments

Nice catch - those kinds of bugs are sometimes the hardest to find.
I completely agree with you.. and it's even worse when you realise it's such a small mistake
Apologies the my code was wrong i altered it as its work code (in my contract that I cannot fully paste working code), in the actual code they are both the same and spelt correctly. I will alter the question to correct this. Apologies for the misdirection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.