Categories
7.0 7.5 C#.NET Microsoft VB.NET Visual Studio Windows Phone

Google AdMob Ads Windows Phone 7 – “Xap packaging failed. Object reference not set to an instance of an object.”

When you try to build Google AdMob Ads Windows Phone 7 sample show the following error message:

Xap packaging failed. Object reference not set to an instance of an object

In Italian

Xap packaging failed. Riferimento a un oggetto non impostato su un’istanza di oggetto.

Cause:

Into the WMAppManifest.xml file there is the following line:

[sourcecode lang=”XML”]
<BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
[/sourcecode]

but in the project not exists the Background.png file.

Solution:

Add Background.png image file like this:

Google AdMob Ads Windows Phone 7 sample Background missing

to the project, then right-click your Background.png in Solution Explorer, select Properties and set Build Action to Content

NOTE: Apply these steps for Google.AdMob.Ads.Sample.Fundamentals and Google.AdMob.Ads.Sample.Intermediate projects.

Note 2: The very first time AdMob sees your publisher ID it may take up to two minutes to receive an ad. This initial two minute lag will recur every time the app goes unused for 24 hours.

Did my solution solve your problem? Leave a reply.

Categories
Microsoft Replication SQL Server

SQL Server – “SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, ‘{old_name}’. (Replication.Utilities)”

If network name or server name is changed and you want to setup the server for replication you’ll receive the following error message:

SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, ‘{old_name}’. (Replication.Utilities)

To get the Current Server Name (Instance Name) run these two queries in Microsoft SQL Server Management Studio that return old_name

[sourcecode language=”sql”]
sp_helpserver
select @@servername
[/sourcecode]

Solution:

Run this:

[sourcecode language=”sql”]
sp_dropserver ‘old_name’
go
sp_addserver ‘new_name’,’local’
go
[/sourcecode]

then start Command Prompt Window (Start -> Run -> cmd) and execute the following command:

net stop mssqlserver
net start mssqlserver

to restart SQL Server Service.

Did my solution solve your problem?

%d bloggers like this: