GameCTO / luainterface

Automatically exported from code.google.com/p/luainterface
0 stars 0 forks source link

Errors and warnings in VS2012 for Windows Phone 8.0 (C# + XNA) #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I've added dll's into references and project folder (Add Existing Item...)
2. I've such code:

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;
using System.IO;

using LuaInterface;

namespace Cs_XNA_Lua
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        Lua pLuaVM;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            // Frame rate is 30 fps by default for Windows Phone.
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Extend battery life under lock.
            InactiveSleepTime = TimeSpan.FromSeconds(1);
        }

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            base.Initialize();
        }

        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            pLuaVM = new Lua();

            if (File.Exists("main.lua") == false)
                System.Diagnostics.Debug.WriteLine("Brak pliku 'main.lua'");

            else
                pLuaVM.DoFile("main.lua");

            // TODO: use this.Content to load your game content here
        }

        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// </summary>
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();

            // TODO: Add your update logic here

            base.Update(gameTime);
        }

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            // TODO: Add your drawing code here

            base.Draw(gameTime);
        }
    }
}

3. When I try to compile it returns me such errors and warnings:

Warning 1   The primary reference "LuaInterface, Version=2.0.0.16708, 
Culture=neutral, processorArchitecture=x86" could not be resolved because it 
has an indirect dependency on the framework assembly "mscorlib, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could 
not be resolved in the currently targeted framework. 
".NETFramework,Version=v4.0". To resolve this problem, either remove the 
reference "LuaInterface, Version=2.0.0.16708, Culture=neutral, 
processorArchitecture=x86" or retarget your application to a framework version 
which contains "mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089".   Cs_XNA_Lua

Warning 2   The primary reference "lua51, Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=1e1fb15b02227b8a, processorArchitecture=x86" could not be 
resolved because it has an indirect dependency on the framework assembly 
"mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
which could not be resolved in the currently targeted framework. 
".NETFramework,Version=v4.0". To resolve this problem, either remove the 
reference "lua51, Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=1e1fb15b02227b8a, processorArchitecture=x86" or retarget your 
application to a framework version which contains "mscorlib, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089".  Cs_XNA_Lua

Warning 3   The primary reference "LuaInterface, Version=2.0.0.16708, 
Culture=neutral, processorArchitecture=x86" could not be resolved because it 
has an indirect dependency on the framework assembly "Microsoft.VisualC, 
Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could 
not be resolved in the currently targeted framework. 
".NETFramework,Version=v4.0". To resolve this problem, either remove the 
reference "LuaInterface, Version=2.0.0.16708, Culture=neutral, 
processorArchitecture=x86" or retarget your application to a framework version 
which contains "Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a".   Cs_XNA_Lua

Warning 4   The primary reference "lua51, Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=1e1fb15b02227b8a, processorArchitecture=x86" could not be 
resolved because it has an indirect dependency on the framework assembly 
"Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently 
targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, 
either remove the reference "lua51, Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=1e1fb15b02227b8a, processorArchitecture=x86" or retarget your 
application to a framework version which contains "Microsoft.VisualC, 
Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Cs_XNA_Lua

Warning 5   The primary reference "LuaInterface, Version=2.0.0.16708, 
Culture=neutral, processorArchitecture=x86" could not be resolved because it 
has an indirect dependency on the framework assembly "System, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved 
in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve 
this problem, either remove the reference "LuaInterface, Version=2.0.0.16708, 
Culture=neutral, processorArchitecture=x86" or retarget your application to a 
framework version which contains "System, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089".   Cs_XNA_Lua

Warning 6   The primary reference "lua51, Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=1e1fb15b02227b8a, processorArchitecture=x86" could not be 
resolved because it has an indirect dependency on the framework assembly 
"System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
which could not be resolved in the currently targeted framework. 
".NETFramework,Version=v4.0". To resolve this problem, either remove the 
reference "lua51, Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=1e1fb15b02227b8a, processorArchitecture=x86" or retarget your 
application to a framework version which contains "System, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089".  Cs_XNA_Lua

Error   7   The type or namespace name 'LuaInterface' could not be found (are you 
missing a using directive or an assembly 
reference?) c:\users\michał\documents\visual studio 
2012\Projects\Cs_XNA_Lua\Cs_XNA_Lua\Cs_XNA_Lua\Game1.cs 14  7   Cs_XNA_Lua

Error   8   The type or namespace name 'Lua' could not be found (are you missing a 
using directive or an assembly reference?)  c:\users\michał\documents\visual 
studio 2012\Projects\Cs_XNA_Lua\Cs_XNA_Lua\Cs_XNA_Lua\Game1.cs  26  9   Cs_XNA_Lua

What is the expected output? What do you see instead?
Just like I've written

What version of the product are you using? On what operating system?
Windows 8 Pro + VS2012Express for Windows Phone 8.0
I'm compiling in C# and XNA 4.0

Please provide any additional information below.

Original issue reported on code.google.com by michal.b...@gmail.com on 28 Mar 2013 at 11:11